An open API service indexing awesome lists of open source software.

https://github.com/franzose/jsonp-es6

Tiny JSONP request wrapper with modern promises support
https://github.com/franzose/jsonp-es6

es6 javascript jsonp jsonp-requests promises

Last synced: about 1 year ago
JSON representation

Tiny JSONP request wrapper with modern promises support

Awesome Lists containing this project

README

          

[![](https://img.shields.io/npm/dt/jsonp-es6.svg)](https://www.npmjs.com/package/jsonp-es6)

# JSONP with promises

This tiny library is based on Lightweight JSONP: https://github.com/erikarenhill/Lightweight-JSONP and allows to use promises along with JSONP requests.

Usage:

```javascript
var jsonp = require('jsonp-promise'),
url = 'http://example.com',
params = {
param1: 'param1',
param2: 'param2'
};

jsonp(url, params)
.then((result) => {
// something useful
});
```