🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

fetch-extras

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-extras - npm Package Compare versions

Comparing version
2.1.0
to
2.1.1
+1
-1
package.json
{
"name": "fetch-extras",
"version": "2.1.0",
"version": "2.1.1",
"description": "Useful utilities for working with Fetch",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -17,5 +17,7 @@ import {copyFetchMetadata} from './utilities.js';

export async function throwIfHttpError(responseOrPromise) {
if (!(responseOrPromise instanceof Response)) {
responseOrPromise = await responseOrPromise;
const throwIfHttpErrorAsync = async responsePromise => throwIfHttpError(await responsePromise);
export function throwIfHttpError(responseOrPromise) {
if (typeof responseOrPromise?.then === 'function') {
return throwIfHttpErrorAsync(responseOrPromise);
}

@@ -22,0 +24,0 @@