Geen omschrijving

json-stream.js 431B

1234567891011121314151617
  1. import Oboe from './lib/oboe-browser.min.js'
  2. import XMLHttpRequest from './polyfill/XMLHttpRequest'
  3. const OboeExtended = (arg: string | object) => {
  4. window.XMLHttpRequest = XMLHttpRequest
  5. window.location = ''
  6. if(typeof arg === 'string')
  7. arg = 'JSONStream://' + arg
  8. else if(typeof arg === 'object')
  9. arg = Object.assign(arg, { url : 'JSONStream://' + arg.url })
  10. return Oboe(arg)
  11. }
  12. export default OboeExtended