UNPKG
hosts-path
Version:
latest (1.0.0)
1.0.0
Get the path to the hosts file
github.com/kevva/hosts-path
kevva/hosts-path
hosts-path
/
index.js
11 lines
(8 loc)
•
215 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
var
path =
require
(
'path'
);
module
.
exports
=
function
(
) {
if
(process.
platform
===
'win32'
) {
return
path.
join
(process.
env
.
SYSTEMROOT
,
'/System32/drivers/etc/hosts'
); }
return
'/etc/hosts'
; };