Nemo's Parental Misguidance
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

hostbyname

0.1.0 • Public • Published

HostByName

We need to use gethostbyname.

However, node.js uses getaddrinfo for resolve address.

So we just use gethostbyname module for node.js.

Getting Started

$ npm install hostbyname
var hostbyname = require("hostbyname");
var cb = function(err, results){
  console.log(results);
};
 
hostbyname.resolve("localhost", cb);
hostbyname.resolve("localhost", "0", cb);
hostbyname.resolve("localhost", "v4", cb);
hostbyname.resolve("localhost", "v6", cb);
hostbyname.resolve("www.google.com", cb);
hostbyname.resolve("www.google.com", "0", cb);
hostbyname.resolve("www.google.com", "v4", cb);
hostbyname.resolve("www.google.com", "v6", cb);
 

LICENSE

MIT

install

npm i hostbyname

Downloadsweekly downloads

0

version

0.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability