promised-jsonp

0.0.1 • Public • Published

promised-jsonp

Promised-jsonp is mainly inspired by jsonp, jsonp is popular but handles result with callback, which is a little bit old-fashioned. So I build promised-jsonp. It's basically a wrapper of jsonp, but I rewrite it.

usage

jsonp('www.someurl.com/api/?foo=boo')
	.then(data => {}, err => {})

// or you could also pass an object to jsonp
jsonp({
	url: 'www.someurl.com/api/',
	data: {
		foo: 'boo'
	},
	prefix: '__jp'
}).then(data => {}, err => {})

test

$ npm run test

Readme

Keywords

Package Sidebar

Install

npm i promised-jsonp

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • stop2stare