# fetch-ponyfill

> A ponyfill (doesn't overwrite the native fetch) for the Fetch specification https://fetch.spec.whatwg.org.

Latest version **7.1.0** (published 2021-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install fetch-ponyfill
pnpm add fetch-ponyfill
yarn add fetch-ponyfill
bun add fetch-ponyfill
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.1.0 |
| Published | 2021-01-19 |
| First published | 2014-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 29 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 234 |
| Author | Mark Stanley Everitt |
| Maintainers | qubyte |
| Keywords | fetch, ponyfill |

## Links

- npm: https://www.npmjs.com/package/fetch-ponyfill
- Repository: https://github.com/qubyte/fetch-ponyfill
- Homepage: https://github.com/qubyte/fetch-ponyfill#readme
- Issues: https://github.com/qubyte/fetch-ponyfill/issues
- npm.io page: https://npm.io/package/fetch-ponyfill

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ~2.6.1

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 7.1.0 (latest) — 2021-01-19
- 7.0.0 — 2020-10-28
- 6.1.1 — 2020-05-31
- 6.1.0 — 2019-06-04
- 6.0.2 — 2018-04-25
- 6.0.1 — 2018-03-28
- 6.0.0 — 2018-03-02
- 5.0.1 — 2018-02-18
- 5.0.0 — 2018-02-04
- 4.1.0 — 2017-07-13
- 4.0.0 — 2017-02-16
- 3.0.2 — 2016-10-03
- 3.0.1 — 2016-09-30
- 3.0.0 — 2016-08-30
- 2.0.1 — 2016-08-23
- … 7 more at https://npm.io/package/fetch-ponyfill/versions

## README

# Fetch Ponyfill

> WHATWG `fetch` [ponyfill](https://ponyfill.com)

This module wraps the [github/fetch](https://github.com/github/fetch) polyfill in a CommonJS module
for browserification, and avoids appending anything to the window, instead returning a setup
function when `fetch-ponyfill` is required. Inspired by
[object-assign](https://github.com/sindresorhus/object-assign).

When used in Node, delegates to `node-fetch` instead.

## Usage

### Browserify

```javascript
const {fetch, Request, Response, Headers} = require('fetch-ponyfill')(options);
```

### Webpack

```javascript
import fetchPonyfill from 'fetch-ponyfill';
const {fetch, Request, Response, Headers} = fetchPonyfill(options);
```

### Options

Where `options` is an object with the following optional properties:

| option | description |
| ------ | ----------- |
| `Promise` | An A+ Promise implementation. Defaults to `window.Promise` in the browser, and `global.Promise` in Node. |
| `XMLHttpRequest` | The XMLHttpRequest constructor. This is useful to feed in when working with Firefox OS. Defaults to `window.XMLHttpRequest`. Has no effect in Node. |

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