Comparing version 1.1.0 to 1.1.1
12
index.js
@@ -109,3 +109,3 @@ "use strict"; | ||
getChunkInfo(length, options) { | ||
let from, limit, to; | ||
let from, limit, to, maxLength; | ||
@@ -130,6 +130,8 @@ if(options.from !== undefined) { | ||
if(limit.compareTo(length) > 0) { | ||
limit = length.subtract(from); | ||
maxLength = length.subtract(from); | ||
if(limit.compareTo(maxLength) > 0) { | ||
limit = maxLength; | ||
} | ||
to = from.add(limit); | ||
@@ -142,3 +144,3 @@ | ||
length: length | ||
} | ||
}; | ||
} | ||
@@ -145,0 +147,0 @@ } |
{ | ||
"name": "ip-cidr", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Module for working with CIDR (v4, v6)", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -30,5 +30,7 @@ # Install | ||
cidr.toRange(); // get array of start and end ip as string [startIpAsString, endIpAsString] | ||
``` | ||
## Client side | ||
Load __/dist/ip-cidr.js__ as script and get the library in window.IPCIDR | ||
# API | ||
@@ -35,0 +37,0 @@ ### .formatIP(address, [options]) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
304066
9863
67
4