jsonp-p

jsonp promisify wrapper.

MIT 7 个版本
安装
npm install jsonp-p
yarn add jsonp-p
pnpm add jsonp-p
bun add jsonp-p
README

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

版本列表
2.0.0 2016-10-22
1.0.4 2016-10-09
1.0.3 2016-03-10
1.0.2 2015-11-16
1.0.1 2015-10-12
1.0.0 2015-10-04
0.0.1 2015-10-03