# parse-jsonp

> Get the payload of a JSONP response.

Latest version **2.0.0** (published 2019-06-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install parse-jsonp
pnpm add parse-jsonp
yarn add parse-jsonp
bun add parse-jsonp
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-06-10 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jannis R |
| Maintainers | derhuerst |
| Keywords | jsonp, ajax, fetch, cors, fetch |

## Links

- npm: https://www.npmjs.com/package/parse-jsonp
- Repository: https://github.com/derhuerst/parse-jsonp
- Issues: https://github.com/derhuerst/parse-jsonp/issues
- npm.io page: https://npm.io/package/parse-jsonp

## Dependencies (1)

- [global](https://npm.io/package/global.md) ^4.3.2

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-06-10
- 1.0.0 — 2018-05-07
- 0.1.0 — 2017-07-20

## README

# parse-jsonp

**Get the payload of a [JSONP](https://en.wikipedia.org/wiki/JSONP) response** in Node.js and in the browser. No `fetch`/AJAX logic in here.

[![npm version](https://img.shields.io/npm/v/parse-jsonp.svg)](https://www.npmjs.com/package/parse-jsonp)
[![build status](https://img.shields.io/travis/derhuerst/parse-jsonp.svg)](https://travis-ci.org/derhuerst/parse-jsonp)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/parse-jsonp.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)
[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)


## Installing

```shell
npm install parse-jsonp
```


## Usage

```js
const {fetch} = require('fetch-ponyfill')()
const parse = require('parse-jsonp')

fetch('some-JSONP-url.js')
.then((res) => res.text())
.then((jsonp) => parse('callback', jsonp))
.then(console.log, console.error)
```

## API

```js
parse(hook, jsonp)
```


## Contributing

If you have a question or have difficulties using `parse-jsonp`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/parse-jsonp/issues).

---
_Source: https://npm.io/package/parse-jsonp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
