Node.js version (not finished yet)
This commit is contained in:
1 parent
4469aa0816
commit
c19d2dd7c1
18 files changed
+487
-562
No files matched your search
@@ -0,0 +1,10 @@
|
||||
const ipaddr = require('ipaddr.js');
|
||||
|
||||
module.exports = ip => {
|
||||
const range = ipaddr.parse(ip).range();
|
||||
return [
|
||||
'unspecified', 'multicast', 'linkLocal', 'loopback', 'reserved', 'benchmarking',
|
||||
'amt', 'broadcast', 'carrierGradeNat', 'private', 'as112', 'uniqueLocal',
|
||||
'ipv4Mapped', 'rfc6145', '6to4', 'teredo', 'as112v6', 'orchid2', 'droneRemoteIdProtocolEntityTags',
|
||||
].includes(range);
|
||||
};
|
||||
Reference in new issue
Block a user