Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

prescription-dns

0.1.0 • Public • Published

Prescription DNS

This exposes the core node.js DNS module as a set of functions that return Observables instead of taking callbacks

Example

var Observable = require("prescription").Observable;
var dns        = require("prescription-dns");
 
// Asynchronously fetch the IP address of google.com, select the last one
// and print it out to the console.
dns.resolve4("www.google.com")
   .flatMap(function(addresses) { return Observable.fromArray(addresses) })
   .last()
   .subscribe(function(address) { console.log(address); });

Keywords

none

install

npm i prescription-dns

Downloadsweekly downloads

2

version

0.1.0

license

none

last publish

collaborators

  • avatar