masksOf() function
The mask table for a family, indexable by prefix length.
Signature:
export declare function masksOf(type: NetworkType): bigint[];
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
the address family |
Returns:
bigint[]
IPV6_MASKS for IPv6, otherwise IPV4_MASKS.
Remarks
Returns the shared array itself, not a copy, so mutating the result corrupts every later conversion. Like sizeOf(), anything that is not exactly IPV6 is treated as IPv4 rather than rejected.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.