Socket
Socket
Sign inDemoInstall

whatwg-fetch

Package Overview
Dependencies
0
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.6.19 to 3.6.20

3

dist/fetch.umd.js

@@ -502,2 +502,3 @@ (function (global, factory) {

var response = new Response(null, {status: 200, statusText: ''});
response.ok = false;
response.status = 0;

@@ -553,3 +554,3 @@ response.type = 'error';

// Only if the status is out of a normal range
if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
options.status = 200;

@@ -556,0 +557,0 @@ } else {

@@ -496,2 +496,3 @@ /* eslint-disable no-prototype-builtins */

var response = new Response(null, {status: 200, statusText: ''})
response.ok = false
response.status = 0

@@ -547,3 +548,3 @@ response.type = 'error'

// Only if the status is out of a normal range
if (request.url.startsWith('file://') && (xhr.status < 200 || xhr.status > 599)) {
if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
options.status = 200;

@@ -550,0 +551,0 @@ } else {

{
"name": "whatwg-fetch",
"description": "A window.fetch polyfill.",
"version": "3.6.19",
"version": "3.6.20",
"main": "./dist/fetch.umd.js",

@@ -6,0 +6,0 @@ "module": "./fetch.js",

# window.fetch polyfill
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/JakeChampion/fetch/badge)](https://securityscorecards.dev/viewer/?uri=github.com/JakeChampion/fetch)
The `fetch()` function is a Promise-based mechanism for programmatically making

@@ -63,6 +65,2 @@ web requests in the browser. This project is a polyfill that implements a subset

As an alternative to using npm, you can obtain `fetch.umd.js` from the
[Releases][] section. The UMD distribution is compatible with AMD and CommonJS
module loaders, as well as loading directly into a page via `<script>` tag.
You will also need a Promise polyfill for [older browsers](https://caniuse.com/promises).

@@ -69,0 +67,0 @@ We recommend [taylorhakes/promise-polyfill](https://github.com/taylorhakes/promise-polyfill)

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