UNPKG

@vercel/fetch-cached-dns

Version:

A decorator on top of `fetch` that caches the DNS query of the `hostname` of the passed URL

7 lines (5 loc) 209 B
import NodeFetch, { Request, RequestInit, Response } from 'node-fetch'; export default function createFetch(fetch?: typeof NodeFetch): ( url: string | Request, init?: RequestInit, ) => Promise<Response>;