diff --git a/lib/ip.js b/lib/ip.js index 4b2adb5..3b5fe8c 100644 --- a/lib/ip.js +++ b/lib/ip.js @@ -200,7 +200,7 @@ ip.subnet = function (addr, mask) { } } - const numberOfAddresses = 2 ** (32 - maskLength); + const numberOfAddresses = Math.pow(2, (32 - maskLength)); return { networkAddress: ip.fromLong(networkAddress),