# dns-sync

> dns-sync

Latest version **0.2.1** (published 2020-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install dns-sync
pnpm add dns-sync
yarn add dns-sync
bun add dns-sync
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-05-20 |
| First published | 2014-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Sanjeev Koranga |
| Maintainers | skoranga |
| Keywords | dns sync, server startup, nodejs |

## Links

- npm: https://www.npmjs.com/package/dns-sync
- Repository: https://github.com/skoranga/node-dns-sync
- Issues: https://github.com/skoranga/node-dns-sync/issues
- npm.io page: https://npm.io/package/dns-sync

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4
- [shelljs](https://npm.io/package/shelljs.md) ~0.8

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2020-05-20
- 0.2.0 — 2019-07-26
- 0.1.3 — 2015-05-29
- 0.1.2 — 2015-03-30
- 0.1.1 — 2014-11-10
- 0.1.0 — 2014-03-25

## README

node-dns-sync
=============

[![Build Status](https://travis-ci.org/skoranga/node-dns-sync.png)](https://travis-ci.org/skoranga/node-dns-sync)

Sync/Blocking DNS resolve. Main usecase is in node server startup.

How to Use
-------

```javascript
var dnsSync = require('dns-sync');

console.log(dnsSync.resolve('www.paypal.com'));     //should return the IP address
console.log(dnsSync.resolve('www.yahoo.com'));
console.log(dnsSync.resolve('www.non-host.something')); //should return null

console.log(dnsSync.resolve('www.google.com', 'AAAA')); //should return AAAA records
console.log(dnsSync.resolve('google.com', 'NS'));   //should return NS record
```

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