# @zeit/dns-cached-resolve

> Caching DNS resolve

Latest version **2.1.2** (published 2021-06-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @zeit/dns-cached-resolve
pnpm add @zeit/dns-cached-resolve
yarn add @zeit/dns-cached-resolve
bun add @zeit/dns-cached-resolve
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2021-06-05 |
| First published | 2017-10-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 16.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | Olli Vanhoja |
| Maintainers | arv, cmvnk, huozhi, aboodman, creationix, kuvos, mrmckeb, mitchellwright, jhoch, ismaelrumzan, ernestd, chriswdmr, cl3arglass, divmain, sokra, raunofreiberg, rizbizkits, julianbenegas, codetheory, matheuss, igorklopov, leo, nkzawa, tootallnate, rauchg, timneutkens, javivelasco, iamevilrabbit, joecohens, quietshu, dav-is, juancampa, styfle, zeit-bot, lucleray, mglagola, andybitz, paulogdm, anatrajkovska, timer, umegaya, arzafran, ijjk, mfix22, lfades, rabaut, coetry, msweeneydev, williamli, ragojose, guybedford, paco, skllcrn, janicklas-ralph, atcastle, keanulee, spanicker, developit, housseindjirdeh, gmonaco, kikobeats, prateekbh, jkrems, jaredpalmer, gielcobben, chibicode, nazarenooviedo, samsisle, okbel, hankvercel, leerobinson, elsigh |
| Keywords | async, dns, resolve, lookup |

## Links

- npm: https://www.npmjs.com/package/@zeit/dns-cached-resolve
- Repository: https://github.com/zeit/dns-cached-resolve
- Issues: https://github.com/zeit/dns-cached-resolve/issues
- npm.io page: https://npm.io/package/@zeit/dns-cached-resolve

## Dependencies (5)

- [lru-cache](https://npm.io/package/lru-cache.md) 5.1.1
- [@types/node](https://npm.io/package/@types/node.md) 10.12.18
- [async-retry](https://npm.io/package/async-retry.md) 1.2.3
- [@types/lru-cache](https://npm.io/package/@types/lru-cache.md) 4.1.1
- [@types/async-retry](https://npm.io/package/@types/async-retry.md) 1.2.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.1.2 (latest) — 2021-06-05
- 2.1.1 — 2019-08-19
- 2.1.0 — 2019-02-04
- 2.0.0 — 2018-12-21
- 1.3.1 — 2018-06-22
- 1.3.0 — 2018-05-23
- 1.2.0 — 2018-04-25
- 1.1.0 — 2017-11-05
- 1.0.0 — 2017-10-19
- 0.1.1 — 2017-10-19
- 0.1.0 — 2017-10-18

## README

Caching DNS Resolver
====================

[![CircleCI](https://circleci.com/gh/zeit/dns-cached-resolve.svg?style=svg)](https://circleci.com/gh/zeit/dns-cached-resolve)

Cache DNS A and AAAA record resolutions.

## Example

**index.js**
```javascript
async function run() {
  console.log('resolve("zeit.co")');
  for (let i = 0; i < 10; i++) {
    console.time('resolve');
    console.log('IP: ', await dnsResolve('zeit.co'));
    console.timeEnd('resolve');
  }
}
run().catch(console.error);
```

```bash
% node index.js
resolve("zeit.co")
IP:  54.153.55.116
resolve: 569.156ms
IP:  54.153.55.116
resolve: 0.256ms
IP:  54.153.55.116
resolve: 0.061ms
IP:  54.153.55.116
resolve: 0.036ms
```

---
_Source: https://npm.io/package/@zeit/dns-cached-resolve · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
