Skip to content

Releases: silverwind/cidr-tools

11.0.0

24 Jul 19:36
11.0.0
c26e235
Compare
Choose a tag to compare

expandCidr now returns a generator instead of array to enable immediate consumption of generated IPs and eliminate a potential memory/performance problem in the module. To migrate previous Array use cases:

expandCidr(nets) -> Array.from(expandCidr(nets))

Be aware that passing large networks that contain millions of IPs can result in memory exhaustion and slow execution time. It's recommended to validate the amount of IPs first, for example, like this:

const {start, end} = parseCidr(net);
if (end - start >= 1000000n) {
  throw new Error("Too many IPs");
}

10.0.0

22 May 20:10
10.0.0
25ad3ce
Compare
Choose a tag to compare

Module has been rewritten in Typescript and the type exports have changed, otherwise it's compatible.

9.0.0

21 Feb 21:45
9.0.0
4bea70a
Compare
Choose a tag to compare

All exported functions have been renamed to include a Cidr suffix:

merge -> mergeCidr
exclude -> excludeCidr
expand -> expandCidr
overlap -> overlapCidr
contains -> containsCidr
normalize -> normalizeCidr
parse -> parseCidr

8.0.0

20 Feb 23:30
8.0.0
e2b96bd
Compare
Choose a tag to compare
  • The single property has been removed from the parse result. Use start === end instead.

7.0.0

16 Sep 15:09
7.0.0
7b3e9b3
Compare
Choose a tag to compare
  • Simplified the validation for CIDRs and IPs. Use is-cidr and is-ip to validate before passing input to this module.
  • Node 18 is now required.

6.0.0

31 May 17:01
6.0.0
6cc621f
Compare
Choose a tag to compare
  • IPv6 normalization has improved and is now RFC-conform
  • Node 16 is now required

5.0.0

13 Sep 18:36
5.0.0
dd938bf
Compare
Choose a tag to compare

Module is now pure ESM and requires Node.js 14.

4.1.0

17 Feb 00:10
4.1.0
db6ded8
Compare
Choose a tag to compare

Node v10 is supported again.

4.0.0

15 Feb 16:44
4.0.0
2a1fb02
Compare
Choose a tag to compare
  • Add new cidrTools.contains function
  • Node 12.17.0 or greater is now required

3.0.0

06 May 19:30
3.0.0
6f741d3
Compare
Choose a tag to compare
  • Node 10 is now required (when running on the server)