Socket
Book a DemoInstallSign in
Socket

@maritz/fetch-ponyfill

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maritz/fetch-ponyfill

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

2.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Fetch Ponyfill

WHATWG fetch ponyfill

Ponyfill: A polyfill that doesn't overwrite the native method.

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

const {fetch, Request, Response, Headers} = require('fetch-ponyfill')(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.

FAQs

Package last updated on 28 Aug 2016

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.