0.2.1 • Published 7 years ago

jsonp v0.2.1

Weekly downloads
295,098
License
-
Repository
github
Last release
7 years ago

jsonp

A simple JSONP implementation.

saucelabs

Installation

Install for node.js or browserify using npm:

$ npm install jsonp

Install for component(1) using component:

$ component install LearnBoost/jsonp

Install for browser using bower:

$ bower install jsonp

API

jsonp(url, opts, fn)

  • url (String) url to fetch
  • opts (Object), optional
    • param (String) name of the query string parameter to specify the callback (defaults to callback)
    • timeout (Number) how long after a timeout error is emitted. 0 to disable (defaults to 60000)
    • prefix (String) prefix for the global callback functions that handle jsonp responses (defaults to __jp)
    • name (String) name of the global callback functions that handle jsonp responses (defaults to prefix + 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 is Timeout.

Returns a function that, when called, will cancel the in-progress jsonp request (fn won't be called).

License

MIT

@map46/ol-react@artsy/reaction@vagalumedigital/gatsby-plugin-mailchimp-api-v3auth0-lock-signup-eventyadong-reactgutenberg-block-componentsyokobotichgatsby-plugin-mailchimp-api-v3nj-login-portalnj_auth_portaltencent_weatheritunes-api-jsbeedeez-webapp-proreact-share-cb@denkristoffer/auth0-lockshinemo-hunca@infinitebrahmanuniverse/nolb-jsonp@everything-registry/sub-chunk-1988dmp-rsc-demoxx-onemap-biz-uixyy-yuixuancao-musicybs-fy-remote-utilsyasheyuntun-plugin-cmsvue-mailchimp-subscribevue-embed-gistvue-embed-gist-nojqueryvue-npm-testjyhvue-lengvue-vux-frameworkvue-shopvue-xmobilevue-xhrvue3-embed-gistvue-simple-good-uivue-weather-widgetvue-satanvuepress-plugin-mailchimpwebsite-essentialsweex-vdom-testerweb-translate-toolwebreety-http-handlerwebpack-devilvuepress-theme-cosmosvuepress-theme-cosmos-levivuestagramvuepress-theme-tendermintwolf-uiwtmtoreniathb-calendartiptap-editor-stcktime-sharingplanteams-react-datasheet-canvastest-bird-fronttest-bonree-design-plustrapid-web-frameworktribune-bing-geocoderts-react-sharetumblr-poststwitch-recurlyuc-core-jsty-client-corezxc-vue-fbzyltestnpmpackages@evlop/corezhixincommon@futpib/react-sharezhujicai-tangram@equilab/foundationzipcode-japanvideo-track-dxyve-form-uploadvenuee-react-share@input-output-hk/mailchimp-subscribe@handday/components@hfaxjs/core@gswl/cweb@in2tec/social-sharesweetleaf-locktdhttpreact-transcriberreact-vimeoreact-vimeo-fork-pocketjosoreact-vimeo-placeholderreact-youtube-autocompletereact-use-mailchimpreact-verlay-mailchimp-formreact-tencent-weatherrecurly-js-tsreact-share-stcreact-share-with-hatenareact-share-igreact-share-kakaoreact-share-kitreact-share-maximreact-share-rc-18react-share-react18react-share-sakulstra
0.2.1

7 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.4

10 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

12 years ago