@literate.ink/utilities
Advanced tools
Comparing version 1.0.0-12591162848.1 to 1.0.0-12591552499.1
@@ -37,3 +37,6 @@ interface Request { | ||
declare const defaultFetcher: Fetcher; | ||
declare class FetcherError extends Error { | ||
constructor(message: string); | ||
} | ||
export { type Fetcher, type Request, type Response, defaultFetcher }; | ||
export { type Fetcher, FetcherError, type Request, type Response, defaultFetcher }; |
@@ -1,1 +0,1 @@ | ||
"use strict";exports.defaultFetcher=async e=>{let t;t={};for(const[r,a]of e.headers)t[r]=a;const r=await fetch(e.url,{redirect:!1===e.follow?"manual":"follow",method:e.method,body:e.body,headers:t,credentials:"omit"}),a=r.status,s=await r.arrayBuffer();return t=((e=>"function"==typeof e.get)(r.headers)?Array.from(r.headers.entries()):Object.entries(r.headers)).map((([e,t])=>[e.toLowerCase(),t])),{status:a,headers:t,bytes:s}};//# sourceMappingURL=index.js.map | ||
"use strict";var e=class extends Error{constructor(e){super(e),this.name="FetcherError"}};exports.FetcherError=e,exports.defaultFetcher=async e=>{let r;r={};for(const[t,s]of e.headers)r[t]=s;const t=await fetch(e.url,{redirect:!1===e.follow?"manual":"follow",method:e.method,body:e.body,headers:r,credentials:"omit"}),s=t.status,a=await t.arrayBuffer();return r=((e=>"function"==typeof e.get)(t.headers)?Array.from(t.headers.entries()):Object.entries(t.headers)).map((([e,r])=>[e.toLowerCase(),r])),{status:s,headers:r,bytes:a}};//# sourceMappingURL=index.js.map |
{ | ||
"name": "@literate.ink/utilities", | ||
"version": "1.0.0-12591162848.1", | ||
"version": "1.0.0-12591552499.1", | ||
"description": "A collection of utilities for our libraries.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/LiterateInk/Utilities", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13595
40