Subnet IP Type or false if failed
import { network } from "@rjweb/utils"
network.isSubnet('127.0.0.1', 'v4') // false
network.isSubnet('127.0.0.1', 'v6') // false
network.isSubnet('::1/128', 'v6') // 'v6'
network.isSubnet('127.0.0.1/32', 'v6 | v4') // 'v4'
network.isSubnet('1.1') // false
network.isSubnet('1.1/32') // 'v4'
1.7.0
nodejs, browser
Check if a Subnet is valid