@zeit/fetch-cached-dns
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.1 • Public • Published

    fetch-cached-dns

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

    How to use

    const fetch = require('fetch-cached-dns')(require('node-fetch'))

    Since this implementation is implementing redirects we are providing an onRedirect extra option to the fetch call that gets called with the response object and the options that will be used for the next request. This allows to access the request from outside and to modify the options.

    NOTE: if the fetch implementation is not supplied, it will attempt to use peerDep node-fetch

    Keywords

    none

    Install

    npm i @zeit/fetch-cached-dns

    DownloadsWeekly Downloads

    18,387

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    5.13 kB

    Total Files

    6

    Last publish

    Collaborators

    • denizkusef
    • javierbyte
    • kayernyc
    • janory
    • goncy
    • codyogden
    • feedthejim
    • tilly3g
    • wits
    • feugy
    • gbibeaulaviolette
    • megbird
    • dizzyup
    • vin-e
    • edgarcerecerezv
    • livcarman
    • segunadebayo
    • pm24601
    • sambecker
    • craigandrews
    • mjakobis
    • kale-stew
    • chloe.tedder
    • pbto
    • daniel.campbell
    • arian-vercel
    • nuta
    • almonk
    • samselikoff
    • dcartertwo
    • baruchadi
    • ejc
    • aaorris
    • doque
    • ryanto
    • nathanhammond
    • snokohn
    • johnphamous
    • tknickman
    • agadzik
    • thomcrowe
    • emeraldsanto
    • ecklf
    • timeyoutakeit
    • cramforce
    • balazs4
    • casey.gowrie
    • samuel.foster
    • swarnavasengupta
    • lydiahallie
    • ethan_arrowood
    • kwonoj
    • kakadiadarpan
    • amanhimself_
    • endangeredmassa
    • nick.tracey
    • reconbot
    • schlez
    • crowterli
    • gsoltis
    • epallerols
    • domysee
    • nwienert
    • arbw
    • stephdietz
    • gudmundur
    • marcgreenstock
    • vvo
    • falcoagustin
    • nabsul
    • bmealey
    • maedahbatool
    • brethudson
    • matt.straka
    • jasongullickson
    • f3d0r
    • gaspar09
    • jtaylor0196
    • pieparker
    • kelly
    • dferber90
    • healeycodes
    • broph123
    • codybrouwers
    • gdborton
    • jeffreyarneson
    • ebb-tide
    • msimulcik
    • domeccleston
    • nutlope
    • hungrybearstudio
    • codetaromiura
    • gkaragkiaouris
    • geovanisouza92
    • dglsparsons
    • lostinpatterns
    • vercel-release-bot
    • southpolesteve
    • matheuss
    • igorklopov
    • nkzawa
    • tootallnate
    • rauchg
    • timneutkens
    • javivelasco
    • iamevilrabbit
    • kdy1
    • quietshu
    • styfle
    • zeit-bot
    • lucleray
    • mglagola
    • andybitz
    • paulogdm
    • anatrajkovska
    • timer
    • arzafran
    • ijjk
    • lfades
    • msweeneydev
    • williamli
    • ragojose
    • guybedford
    • skllcrn
    • janicklas-ralph
    • atcastle
    • spanicker
    • housseindjirdeh
    • gmonaco
    • kikobeats
    • prateekbh
    • jkrems
    • jaredpalmer
    • gielcobben
    • chibicode
    • nazarenooviedo
    • samsisle
    • okbel
    • hankvercel
    • leerobinson
    • elsigh
    • julianbenegas
    • rizbizkits
    • sokra
    • cl3arglass
    • chriswdmr
    • ernestd
    • ismaelrumzan
    • jhoch
    • mitchellwright
    • mrmckeb
    • kuvos
    • creationix
    • huozhi
    • cmvnk
    • ktcarter
    • padmaia
    • delba
    • catsaremlg
    • steventey
    • gsandhu
    • dbredvick