fetch-extras
Advanced tools
+1
-1
| { | ||
| "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 @@ |
153898
0.07%3473
0.03%