UNPKG

get-hosts-cli

Version:

`etc/hosts` as an array of arrays, on the CLI.

12 lines (10 loc) 255 B
'use strict'; module.exports = function (opts) { var getHosts = require('get-hosts'); if (opts.pretty) { var objToTable = require('obj-to-table'); console.log(objToTable(getHosts()).toString()); } else { console.log(getHosts()); } };