UNPKG

@formant/ava

Version:

A framework for automated visual analytics.

27 lines (26 loc) 838 B
/** * Return an array with unique elements * @param value */ export declare function unique(value: unknown[]): unknown[]; /** * Generate an array from 0 to number. * @param number */ export declare function range(number: Number): number[]; /** Generate an array with all 1 elements */ export declare function nOnes(n: number): any[]; /** Generate an array with all 0 elements */ export declare function nZeros(n: number): any[]; /** * assert * @param condition * @param errorMessage */ export declare function assert(condition: unknown, errorMessage?: string): asserts condition; /** * Check parent-child relationship. A child has only one parent, but a parent can have more children. * @param parent * @param child */ export declare function isParentChild(parent: (string | number)[], child: (string | number)[]): boolean;