ip-num
ip-num copied to clipboard
Custom nextIPNumber / previousIPNumber [IPv4 / IPv6]
Hello,
I've got proposal to extend functionality of (nextIPNumber / previousIPNumber).
We can pass optional argument i.e. count into previous method and based on that count, generate next (or previous) ip number increased (or decreased) by this count.
Examples:
IPv4
init IP Number: 192.168.1.1
count: 10
next IP Number: 192.168.1.11
previous IP Number: 192.168.0.247
IPv6
init IP Number: 1::1
count: 10
next IP Number: 1000:0:0:0:0:0:b
previous IP Number: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff7
Thanks for this suggestions.
It falls under a broader improvement to unify the iterable within the library. I created the issue #45 to think about and work on this.