How to use the ip-cidr function in ip-cidr

To help you get started, we’ve selected a few ip-cidr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FSecureLABS / dref / dref / scripts / src / libs / network.js View on Github external
export async function getLocalSubnet (suffix = 24) {
  const localIp = await getLocalIP()
  if (localIp === '') return []

  const cidr = new IPCIDR(localIp + '/' + suffix)
  return cidr.toArray()
}

ip-cidr

Module for working with CIDR (v4, v6)

MIT
Latest version published 4 months ago

Package Health Score

61 / 100
Full package analysis

Popular ip-cidr functions