# NetworkList.toArray() method · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.networklist.toarray/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

The stored networks as CIDR records.

**Signature:**

```typescript
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. Each stored range is re-expressed as its minimal cover, so duplicates are gone and 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.

