net: port isIPv6() to JS
Porting isIPv6()
to JS makes it 10%-250% faster in most cases and reduces some C++ code. This change also adds tests for some edge cases.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines