jsonp-p

2.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i jsonp-p

Weekly Downloads

2,433

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sugarshin