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@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-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@ctsy/wechat@cycle/jsonp@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-clientzipcode-japanlwj-base-apistrava-geojsonstart-web-devsuggestionstemmlerjs-gatsby-plugin-mailchimpsome-map-componentsty-client-coretwitch-recurlyuc-core-jstumblr-poststest-bonree-design-plustest-bird-fronttime-sharingplantoreniatiptap-editor-stcktribune-bing-geocodertrapid-web-framework@amc-udk/utils@antdev/react-bricks-ui@authok/authok-lock@alicd/crui-address@alicd/oc-address@alicd/iot-address@aligov/portal-sdk@alilc/lowcode-datasource-jsonp-handler@ciaran0/react-share@cleandersonlobo/react-share@clipchamp/react-share@40bears/japan-postal-code-ts@0xcj/react-share@act2do/build@aamodtgroup/react-mailchimp-form@a-g/game@digiforce-cloud/dvd-datasource-jsonp-handlerxx-onemap-biz-uiyasheybs-fy-remote-utilsyuntun-plugin-cmsxyy-yui
0.2.1

9 years ago

0.2.0

10 years ago

0.1.0

11 years ago

0.0.4

11 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

13 years ago