hosts-parser
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "hosts-parser", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "hosts file parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,3 +9,3 @@ # hosts-parser | ||
var fs = require('fs'); | ||
var Hosts = require('hosts-parser'); | ||
var Hosts = require('hosts-parser').Hosts; | ||
var hosts = new Hosts(fs.readFileSync('/etc/hosts', 'utf8')); | ||
@@ -28,3 +28,3 @@ console.log(hosts.toJSON()); | ||
``` | ||
var file = fs.readFileSync('/etc/hosts') | ||
var file = fs.readFileSync('/etc/hosts', 'utf-8'); | ||
var hosts = new Hosts(file); | ||
@@ -31,0 +31,0 @@ // or (new Hosts()).parse(file); |
8156