2.0.1 • Published 9 years ago
get-hosts v2.0.1
get-hosts 
etc/hostsas an array of objects.
Install
$ npm install --save get-hostsUsage
var getHosts = require('get-hosts');
getHosts(); // sync
getHosts(function(err,hosts){
	if(!err) console.log(hosts);
});
/*[ { 'local.dev': '127.0.0.1' },
  { localhost: '127.0.0.1' },
  { broadcasthost: '255.255.255.255' },
  { 'localhost~ ': '::1' } ]*/Related
- get-hosts-cli - CLI for this module
 
License
MIT © Hemanth.HM