🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

get-hosts

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-hosts

`etc/hosts` as an array of objects.

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

get-hosts Build Status

etc/hosts as an array of objects.

Install

$ npm install --save get-hosts

Usage

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' } ]*/

  • get-hosts-cli - CLI for this module

License

MIT © Hemanth.HM

Keywords

hosts

FAQs

Package last updated on 05 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts