promisify-jsonp
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

promisify-jsonp

NPM version License

Light and robust JSONP library.

Installation

$ npm install --save promisify-jsonp

Usage

pjsonp(url, options);

Options

name type required default value description
callbackName String false - name of jsonp callback function
callbackNamePrefix String false __jp prefix for callbackName
callbackParamName String false callback parameter name of callbackName in query string
timeout Number false 0 request timeout(0 means no timeout)
params Object false {} extend parameter to query string
encode Boolean false true encode 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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.2
    18
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.2
    18
  • 1.1.1
    0
  • 1.1.0
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i promisify-jsonp

Weekly Downloads

18

Version

1.1.2

License

MIT

Unpacked Size

46.9 kB

Total Files

19

Last publish

Collaborators

  • hanai