# browser-jsonp

> A slim JSONP request library for Javascript.

Latest version **1.1.5** (published 2016-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install browser-jsonp
pnpm add browser-jsonp
yarn add browser-jsonp
bun add browser-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.1.5 |
| Published | 2016-05-20 |
| First published | 2014-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 82 |
| Author | Larry Osborn |
| Maintainers | larryosborn |
| Keywords | jsonp, javascript |

## Links

- npm: https://www.npmjs.com/package/browser-jsonp
- Repository: https://github.com/larryosborn/JSONP
- Issues: https://github.com/larryosborn/JSONP/issues
- npm.io page: https://npm.io/package/browser-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.1.5 (latest) — 2016-05-20
- 1.1.4 — 2016-04-08
- 1.1.3 — 2016-02-29
- 1.1.2 — 2015-12-10
- 1.1.1 — 2015-09-04
- 1.1.0 — 2015-09-04
- 1.0.8 — 2014-11-10
- 1.0.7 — 2014-11-05
- 1.0.5 — 2014-11-05
- 1.0.4 — 2014-10-15
- 1.0.3 — 2014-10-09
- 1.0.2 — 2014-10-09
- 1.0.1 — 2014-10-09
- 1.0.0 — 2014-10-09

## README

JSONP
=====

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]

A slim JSONP request library for Javascript.

Usage
=====

```javascript
JSONP({
    url: 'http://api.example.com/sample.js',
    data: { foo: 'bar' },
    success: function(data) { console.log(data); }
});
```
This example will generate:
```html
<script src="http://api.example.com/sample.js?foo=bar&callback=jsonp_a1b2c3d4e5f6g7h" async="true"></script>
```

Options
=======

 * url: (string) (required) URL for the JSONP resource.
 * data: (object) (optional) Object used to generate GET query parameters for the JSONP resource.
 * success: (function) (optional) Callback function executed upon a successful request.
 * error: (function) (optional) Callback function executed for a failed request.
 * complete: (function) (optional) Callback function exected when the request is completed regardless of success or error.
 * beforeSend: (function) (optional) Callback function executed before request is created. If it returns false, the request is aborted.
 * callbackName: (string) (optional) Name of callback function name. Default is 'callback'.

[npm-url]: https://npmjs.org/package/browser-jsonp
[npm-image]: http://img.shields.io/npm/v/browser-jsonp.svg
[travis-url]: https://travis-ci.org/larryosborn/JSONP
[travis-image]: http://img.shields.io/travis/larryosborn/JSONP.svg

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