UNPKG
ip-utils
Version:
latest (2.4.0)
2.4.0
2.3.0
2.2.2
2.2.1
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
Library of useful functions related to IP
github.com/librasean/IP-Utils
librasean/IP-Utils
ip-utils
/
lib
/
module
/
esnext
/
CidrToMask.js
5 lines
(4 loc)
•
109 B
JavaScript
View Raw
1
2
3
4
5
export
function
cidrToMask(subnet) {
let
split
= subnet.split(
'/'
);
return
parseInt(
split
[1], 10); }