From 6afbfc0d0ddfd163f9a2e5d552398f0bf21bdf35 Mon Sep 17 00:00:00 2001 From: ArulmozhiAvinash Date: Sun, 11 Sep 2022 15:10:09 +0530 Subject: [PATCH] Update ip.js Changing from Exponentiation (**) to Math.pow() function to support older versions of node runtime environments --- lib/ip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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),