NetworkList.toArray() method
The stored networks as CIDR records.
Signature:
toArray(canonical?: boolean): string[];
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
canonical |
boolean |
(Optional) for IPv6, render the expanded form rather than the compressed one |
Returns:
string[]
CIDR records covering exactly the same addresses as this list.
Default Value
canonical defaults to false
Remarks
Not necessarily the records you constructed with. Overlapping inputs were already coalesced at construction, so a supernet listed beside a subnet of it comes back as just the supernet. Each stored range is then re-expressed as its minimal cover, so a range that does not align to one prefix comes back as several records. The addresses covered are identical; the record list need not be.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.