You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const Address4 = require('ip-address').Address4;
const address = new Address4('47.227.219.97/16');
console.log(address.isValid());
outputs true
but should false, like python's similar library
Python 3.5.6 (default, Nov 13 2018, 08:43:46)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddress
>>> ipaddress.ip_network('47.227.219.97/24')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/alt/python35/lib64/python3.5/ipaddress.py", line 74, in ip_network
return IPv4Network(address, strict)
File "/opt/alt/python35/lib64/python3.5/ipaddress.py", line 1537, in __init__
raise ValueError('%s has host bits set' % self)
ValueError: 47.227.219.97/24 has host bits set
The text was updated successfully, but these errors were encountered:
outputs
true
but should
false
, like python's similar libraryThe text was updated successfully, but these errors were encountered: