Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
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 arrays.

Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

get-hosts Build Status

etc/hosts as an array of arrays.

Install

$ npm install --save get-hosts

Usage

var getHosts = require('get-hosts');

getHosts();
/*
[ [ '127.0.0.1', 'local.dev' ],
  [ '127.0.0.1', 'localhost' ],
  [ '255.255.255.255', 'broadcasthost' ],
  [ '::1', 'localhost~ ' ] ] */

P.S: It's sync file read operation here, given the size of the file.

License

MIT © Hemanth.HM

Keywords

hosts

FAQs

Package last updated on 09 Jul 2015

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