Closed vasco-santos closed 3 years ago
I'll give it a test soon! Looks good.
What was wrong with netmask?
netmask
does not support ipv6 addresses
EDIT: https://github.com/rs/node-netmask/issues/8 I would like support on that, but I am not familiar with coffeescript at all
npm run test
168 passed
Also tested the inverse of the test and 168 failed which is good.
Here's upstream of is-ip anyway: https://github.com/sindresorhus/ip-regex/blob/master/index.js
@frenchbread
Thanks for the PR! Good work. Works fine for me as well.
Could you please update the package version also, @vasco-santos & I'll merge it.
Sure, added a new commit for the release.
@vasco-santos Cool, thanks!
Sorry, @vasco-santos, for rising these points after code has been merged. I am just wondering for future improvements.
This PR adds regex for
ipv6
addresses per #3 . I needed to do a special validation for addresses started by0
as they were not being consideredipv4
. Open to improve this solutionThis was based on https://en.m.wikipedia.org/wiki/Reserved_IP_addresses#IPv6
cc @sickcodes @frenchbread