MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / parseNetmask

Function parseNetmask

packages/proxy-addr/src/index.ts:122–125  ·  view source on GitHub ↗

* Parse netmask string into CIDR range. * * @param netmask * @private

(netmask: string)

Source from the content-addressed store, hash-verified

120 * @private
121 */
122function parseNetmask(netmask: string) {
123 const ip = parseip(netmask)
124 return ip.kind() === 'ipv4' ? ip.prefixLengthFromSubnetMask() : null
125}
126/**
127 * Determine address of proxied request.
128 *

Callers 1

parseIPNotationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected