# unwrap-jsonp

> Unwrap the values in a JSONP function.

Latest version **1.0.0** (published 2020-03-31) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-03-31 |
| First published | 2020-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Richie Bendall |
| Maintainers | richienb |
| Keywords | jsonp, unwrap, get, parse, process, json, arguments |

## Links

- npm: https://www.npmjs.com/package/unwrap-jsonp
- Repository: https://github.com/Richienb/unwrap-jsonp
- npm.io page: https://npm.io/package/unwrap-jsonp

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-03-31

## README

# unwrap-jsonp [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/unwrap-jsonp/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/unwrap-jsonp)

Unwrap the values in a JSONP function.

[![NPM Badge](https://nodei.co/npm/unwrap-jsonp.png)](https://npmjs.com/package/unwrap-jsonp)

## Install

```sh
npm install unwrap-jsonp
```

## Usage

```js
const unwrapJsonp = require("unwrap-jsonp")

unwrapJsonp(`fn({a: "b"})`)
//=> {a: "b"}

unwrapJsonp(`fn("a", "b")`, {multiArgs: true})
//=> ["a", "b"]
```

## API

### unwrapJsonp(data, options?)

#### data

Type: `string`

The jsonp to parse.

#### options

Type: `object`

##### multiArgs

Type: `boolean`\
Default: `false`

Return an array of the function arguments instead of just the first one.

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