API Reference@grafana/data › vectorator

vectorator() function

vectorator() function

Use functional programming with your vector

Signature

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[];
};

Import

import { vectorator } from '@grafana/data';

Parameters

Parameter Type Description
vector Vector<T>

Returns:

{ [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[]; }