UNPKG
is-localhost
Version:
latest (0.0.2)
0.0.2
0.0.1
Is localhost predicate
github.com/jwerle/is-localhost
jwerle/is-localhost
is-localhost
/
README.md
25 lines
(16 loc)
•
276 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
is
-localhost ============ Determine
if
a host
is
a localhost
## install
```sh $ npm install
is
-localhost ```
## usage
```js
var
isLocal = require(
'is-localhost'
) isLocal(
'127.0.0.1'
);
// true
isLocal(
'12.34.56.78'
);
// false
isLocal(
'::1'
);
// true
```
## license
MIT