【文件属性】:
文件名称:bogon:检查IP是否为Bogon
文件大小:3KB
文件格式:ZIP
更新时间:2021-04-07 18:26:54
JavaScript
鲍根
检查IP是否为Bogon
npm install bogon
用法
const bogon = require ( 'bogon' )
console . log ( bogon ( '192.168.0.1' ) ) // true
console . log ( bogon ( '8.8.8.8' ) ) // false
作为实用程序,它还提供了isPrivate帮助程序来检测Bogon IP是否是本地网络上的私有IP地址。
console . log ( bogon . isPrivate ( '192.168.0.1' ) ) // true
console . log ( bogon ( '224.0.1.1' ) ) // true
console . log ( bogon . isPrivate ( '224.0.1.1' ) ) // false
执照
麻省
【文件预览】:
bogon-master
----.gitignore(24B)
----package.json(438B)
----LICENSE(1KB)
----index.js(1KB)
----.github()
--------workflows()
----README.md(514B)