0.0.2 • Published 10 years ago

co-dns v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

co-dns

Node core dns wrapped functions that return thunks for co.

Installation

$ npm install co-dns --save

Example

Use all the regular async dns functions without callback hell:

var wrap = require('co-dns')
var dns = wrap(require('dns'))

var hostnames = yield dns.reverse('8.8.8.8') // returns an array

// returns an array, where ip[0] is the ip address and ip[1] is the family (ipv4 or ipv6)
var ip = yield dns.lookup('bing.com')

License

MIT

0.0.2

10 years ago

0.0.1

10 years ago