UNPKG

memoized-node-fetch

Version:

A wrapper around node-fetch that caches the request's promise before resolving.

5 lines 456 B
import { RequestInfo, RequestInit, Response } from 'node-fetch'; import { HashFunction } from './hasher'; export declare type FetchFunctionType = (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>; export default function memoizedNodeFetchFactory(fetchFunction?: FetchFunctionType): (url: RequestInfo, options?: RequestInit | undefined, hashFunction?: HashFunction) => Promise<Response> | undefined; //# sourceMappingURL=index.d.ts.map