# neighbors

function in `@dioramajs/data/graph`

```ts
import { neighbors } from '@dioramajs/data/graph'
```

Neighbors of every node, in the order the links were written.

```ts
function neighbors(n: number, edges: readonly GraphEdge[]): number[][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `n` | `number` |  |
| `edges` | `readonly GraphEdge[]` |  |

Defined in [packages/data/src/graph.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/data/src/graph.ts#L194).
