ipaddrjs

GitHub Workflow Status Codecov

Deno port of ipaddr.js library. Used by proxy_addr.

Example

import { isValid } from 'https://deno.land/x/ipaddr.js/mod.ts'

isValid('127.0.0.1') // true

Implementation Status

IP

  • prefixLengthFromSubnetMask
  • toString
  • toNormalizedString
  • toByteArray

IPv4

  • broadcastAddressFromCIDR
  • isIPv4
  • isValidFourPartDecimal
  • isValid
  • networkAddressFromCIDR
  • parse
  • parseCIDR
  • subnetMaskFromPrefixLength
  • match
  • range
  • subnetMatch
  • toIPv4MappedAddress

IPv6

  • broadcastAddressFromCIDR
  • isIPv6
  • isValid
  • networkAddressFromCIDR
  • parse
  • parseCIDR
  • subnetMaskFromPrefixLength
  • isIPv4MappedAddress
  • match
  • range
  • subnetMatch
  • toIPv4Address
  • toRFC5952String