0.2.1 • Published 9 years ago

jsonp v0.2.1

Weekly downloads
295,098
License
-
Repository
github
Last release
9 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@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-demo@tongdun/utils-httptdhttpweex-vdom-testerwlfe-httpwolf-uiweb-translate-toolvue-npm-testjyhvue-mailchimp-subscribevue-lengwtmxing-ti-ui-demoxingti-modulewufanqing12122teams-react-datasheet-canvassweetleaf-lockthb-calendarvenuee-react-shareve-form-uploadvue-embed-gistvue-embed-gist-nojqueryvideo-track-dxy@rtcamp/gb-componentsjp-postalcode-lookupjsonp_czqjsonp-fallbackjsonp-pjud-vdom-testerjs-unif-commonjs-unif-corejp-postal-codejs-unif-core-newjs-unif-core-v1js-unif-core-v2js-uniframe-corejapan-post-code-custom-reupjapan-postal-codejapan-postal-zip-codeit-web-report-adminjxeduyun-cas-clientimusic_reganimoocmanageridgexchangeibuilding-mapimg-upload-vue2hzw-componentsice-assetshotel-saas-xgsmock_loadergoogle-panorama-by-idhtjosephhsy-clihally-packagehydrocarbon-client-modulehuya-react-ssrlightning_wbliberotemporelive-componentslive-react-shareluizalabs-challengelwt_jsonplynn-bootlwj-front-core-toolslwj-base-frontendlwj-base-frontentlwj-business-frontendlwj-front-core-apilwj-easy-report-frontendmaterial-ui-youtube-autocompletemcloud-sdkmedia-embedmailchimp-postmailchimp-reactlzh_admin_vitekyso-auth0-lockkimiiz-react-sharemember-selectmattwbcs-use-mailchimp-formmcaptcha@waltiu/http@webdollar/front-webdollar@wl-fe/http@wdesign/vue-cli-plugin-micro
0.2.1

9 years ago

0.2.0

11 years ago

0.1.0

11 years ago

0.0.4

11 years ago

0.0.3

13 years ago

0.0.2

13 years ago

0.0.1

13 years ago