Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

vectorator() function

vectorator() function

Use functional programming with your vector

Signature

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

Import

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

Parameters

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