Socket
Socket
Sign inDemoInstall

fetch-ponyfill

Package Overview
Dependencies
7
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fetch-ponyfill

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


Version published
Weekly downloads
191K
decreased by-0.76%
Maintainers
1
Install size
185 kB
Created
Weekly downloads
 

Changelog

Source

7.1.0

  • Updates whatwg-fetch to 3.5.0 to address an issue with IE11.

Readme

Source

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:

optiondescription
PromiseAn A+ Promise implementation. Defaults to window.Promise in the browser, and global.Promise in Node.
XMLHttpRequestThe XMLHttpRequest constructor. This is useful to feed in when working with Firefox OS. Defaults to window.XMLHttpRequest. Has no effect in Node.

Keywords

FAQs

Last updated on 19 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc