+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "vectorator"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++

## vectorator() function

### vectorator() function

Use functional programming with your vector

<b>Signature</b>

```typescript
export declare function vectorator<T>(vector: Vector<T>): {
    [Symbol.iterator](): Generator<T, void, unknown>;
    forEach(iterator: (row: T) => void): void;
    map<V>(transform: (item: T, index: number) => V): V[];
    filter<V_1>(predicate: (item: T) => V_1): T[];
};
```
<b>Import</b>

```typescript
import { vectorator } from '@grafana/data';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  vector | <code>Vector&lt;T&gt;</code> |  |

<b>Returns:</b>

`{
    [Symbol.iterator](): Generator<T, void, unknown>;
    forEach(iterator: (row: T) => void): void;
    map<V>(transform: (item: T, index: number) => V): V[];
    filter<V_1>(predicate: (item: T) => V_1): T[];
}`

