npm install jsonpA simple JSONP implementation.
[![saucelabs][saucelabs-image]][saucelabs-url]
Install for node.js or browserify using npm:
`` bash`
$ npm install jsonp
Install for component(1) using component:
` bash`
$ component install LearnBoost/jsonp
Install for browser using bower:
` bash`
$ bower install jsonp
- url (String) url to fetchopts
- (Object), optionalparam
- (String) name of the query string parameter to specifycallback
the callback (defaults to )timeout
- (Number) how long after a timeout error is emitted. 0 to60000
disable (defaults to )prefix
- (String) prefix for the global callback functions that__jp
handle jsonp responses (defaults to )name
- (String) name of the global callback functions thatprefix
handle jsonp responses (defaults to + incremented counter)fn
- callback
The callback is called with err, data parameters.
If it times out, the err will be an Error object whose message isTimeout.
Returns a function that, when called, will cancel the in-progress jsonp request
(fn` won't be called).
MIT
[saucelabs-image]: https://saucelabs.com/browser-matrix/jsonp.svg
[saucelabs-url]: https://saucelabs.com/u/jsonp