Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

promisify-jsonp

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Issues
File Explorer

Advanced tools

promisify-jsonp

Promisify JSONP

    1.1.2latest

Version published
Maintainers
1
Yearly downloads
2,976
decreased by-6.36%

Weekly downloads

Changelog

Source

1.1.2

  • 更新 README
  • 添加 CHANGELOG

Readme

Source

promisify-jsonp

NPM version License

Light and robust JSONP library.

Installation

$ npm install --save promisify-jsonp

Usage

pjsonp(url, options);

Options

nametyperequireddefault valuedescription
callbackNameStringfalse-name of jsonp callback function
callbackNamePrefixStringfalse__jpprefix for callbackName
callbackParamNameStringfalsecallbackparameter name of callbackName in query string
timeoutNumberfalse0request timeout(0 means no timeout)
paramsObjectfalse{}extend parameter to query string
encodeBooleanfalsetrueencode parameter in query string

Example

var pjsonp = require("pjsonp"); pjsonp("https://www.example.com/jsonp") .then((res) => { console.log(res); }) .catch((err) => { console.log(err); });

License

MIT

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc