fetch-ponyfill
A ponyfill (doesn't overwrite the native fetch) for the Fetch specification https://fetch.spec.whatwg.org.
Last updated 5 years ago by qubyte .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fetch-ponyfill 
SYNC missed versions from official npm registry.

Fetch Ponyfill

WHATWG fetch ponyfill

This module wraps the 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.

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

Usage

Browserify

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

Webpack

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.

Current Tags

  • 7.1.0                                ...           latest (5 years ago)

22 Versions

  • 7.1.0                                ...           5 years ago
  • 7.0.0                                ...           5 years ago
  • 6.1.1                                ...           6 years ago
  • 6.1.0                                ...           7 years ago
  • 6.0.2                                ...           8 years ago
  • 6.0.1                                ...           8 years ago
  • 6.0.0                                ...           8 years ago
  • 5.0.1                                ...           8 years ago
  • 5.0.0                                ...           8 years ago
  • 4.1.0                                ...           9 years ago
  • 4.0.0                                ...           9 years ago
  • 3.0.2                                ...           10 years ago
  • 3.0.1                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 2.0.1                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.9.0                                ...           11 years ago
  • 0.7.0                                ...           11 years ago
  • 0.6.0                                ...           11 years ago
  • 0.4.0                                ...           11 years ago
  • 0.3.2                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (13)

Copyright 2013 - present © cnpmjs.org | Home |