# toStringArray() function · @imqueue/net

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

Unpacks a binary list back into CIDR text.

**Signature:**

```typescript
export declare function toStringArray(list: Buffer, type: NetworkType, canonical?: boolean): string[];
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| list | Buffer | a buffer produced by [toBinaryList()](https://imqueue.org/api/net/latest/net.tobinarylist/) |
| type | [NetworkType](https://imqueue.org/api/net/latest/net.networktype/) | which family the buffer holds |
| canonical | boolean | _(Optional)_ for IPv6, render expanded rather than compressed addresses |


**Returns:**

string\[\]

CIDR records covering the same addresses as the buffer.

## Default Value

`canonical` defaults to `false`

## Remarks

Not necessarily the records you packed. Each stored range is re-expressed as its minimal cover by [intRangeToCidr()](https://imqueue.org/api/net/latest/net.intrangetocidr/), so a range that came from one record comes back as one record, but a range that does not align to a single prefix comes back as several. Round-tripping is therefore lossless in addresses covered and not in record count.

