A DNS wrapper for Prescription the FRP framework

npm install prescription-dns
2 downloads in the last week
4 downloads in the last month

Prescription DNS

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


var Observable = require("prescription").Observable;
var dns        = require("prescription-dns");

// Asynchronously fetch the IP address of, select the last one
// and print it out to the console.
   .flatMap(function(addresses) { return Observable.fromArray(addresses) })
   .subscribe(function(address) { console.log(address); });
npm loves you