MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / isV6Format

Function isV6Format

client/src/components/formHelpers/form-ip-utils.ts:77–79  ·  view source on GitHub ↗
(ip: string)

Source from the content-addressed store, hash-verified

75 /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;
76
77function isV6Format(ip: string) {
78 return ipv6Regex.test(ip);
79}
80
81function normalizeToLong(addr: string) {
82 const parts = addr.split('.').map(part => {

Callers 1

isPrivateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected