2.0.0 • Published 8 years ago

jsonp-p v2.0.0

Weekly downloads
337
License
MIT
Repository
github
Last release
8 years ago

jsonp-p

npm version Build Status Dependency Status Devdependency Status License

jsonp promisify wrapper.

Getting started

npm i jsonp-p

Usage

import jsonpP from 'jsonp-p';

jsonpP(url, jsonpOpts).promise
  .then(response => {})
  .catch(error => {});

Promise is required

jsonpOpts

https://github.com/webmodules/jsonp#jsonpurl-opts-fn

Cancel

const { cancel } = jsonpP(url);
cancel(); // Canceled

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

© sugarshin