@dotup/dotup-ts-types
Version:
Typescript types and helper
9 lines (8 loc) • 412 B
TypeScript
export declare namespace ArrayTools {
function insert<T>(arr: T[], val: T | T[], previousItem?: T): void;
function getArray<T>(value: T | T[] | undefined): T[];
function shuffle<T>(array: T[]): T[];
function getUniqueRandomKeys(array: any[], count: number): string[];
function getUniqueRandomValues<T>(array: T[], count: number): T[];
function getRandomValue<T>(array: T[]): T;
}