for an input of '14.048.2.7' it should return that this IP is Invalid. because from the parser point of view 8 is not in the octal range and that is why it is invalid.
what it actually returns is a parsed ip which looks like this '14.4.2.7'.
i think that the issue lies in this part of the code:
hey,
i have written unit tests to a function that uses ipaddr.js and i found some weird behaviour.
for an input of '14.048.2.7' it should return that this IP is Invalid. because from the parser point of view 8 is not in the octal range and that is why it is invalid. what it actually returns is a parsed ip which looks like this '14.4.2.7'.
i think that the issue lies in this part of the code:
maybe there should be a validation that the digits are in the octal range