import { Consumer, Predicate, Processor, Comparator } from '../../typings/function-types'; export declare namespace Arrays { const props: void; /** * Ensures the given value is a string array. * * @param {any} x - The value to ensure. * @returns {string[]} The string array. */ const toStringArray: (x: any[]) => string[]; const randomJoin: (n: number, delim?: string, ...args: any[]) => string; const validateString: (input: string, lexDelim?: string, tokenDelim?: string) => boolean; const findMinValue: (arr: number[]) => number; const findMaxValue: (arr: number[]) => number; const selectors: (keys: string[], selectors: string[]) => { [k: string]: any; }; const trimNulls: (arr: T[]) => { deleted: number; result: T[]; }; const init: void; /** * Copies array and then pushes item into it. * @param {array} arr Array to copy and into which to push * @param {any} item Array item to add (to end) * @returns {array} Copy of the original array */ const push: (arr: any[], item: any) => any[]; /** * Copies array and then unshifts item into it. * @param {any} item Array item to add (to beginning) * @param {array} arr Array to copy and into which to unshift * @returns {array} Copy of the original array */ const unshift: (item: any, arr: any) => any[]; /** * Copy items out of one array into another. * @param {array} source Array with items to copy * @param {array} target Array to which to copy * @param {function} conditionCb Callback passed the current item; * will move item if evaluates to `true` * @returns {void} */ const moveToAnotherArray: (source: any[], target: any[], conditionCb: any) => void; const list: (...args: any[]) => any[]; /** * Creates array by range * range(n) creates a array from 1 to n, including n * range(n,m) creates a array from n to m, by step of 1. May not include m, if n or m are not integer. * range(n,m,delta) creates a array from n to m, by step of delta. May not include m * * @param min * @param max * @param delta */ const rangeBy: (min: number, max?: number | undefined, delta?: number | undefined) => number[]; const insertAll: (array: any[], index: number, ...args: any) => any[]; function shuffle(arr: T[]): T[]; const range: (start: number, end: number, step: number) => number[]; const randomElement: (arr: T[]) => T; /** * Utility function to create a K:V from a list of strings * @param o initial input array to operate by * @param func */ const strToEnum: (o: T[], func: (v: T) => V) => { [K in T]: V; }; /** * Utility function to create a K:V from a list of strings * @param o initial input array to operate by * @param func */ const strToEnumFunc: (o: T[], func: (v: T) => V) => { [K in T]: V; }; const sortByNumber: (items: T[], property: string, direction?: string) => T[]; const filterBy: (property: PropertyKey) => Consumer; const sortByString: (items: T[], property: string, direction?: string) => T[]; const sortProjectsByFunction: (projects: T[], func: Processor, property: string, direction?: string) => T[]; const groupBy: (list: T[], getKey: (item: T) => K) => Record; const average: (array: number[]) => number; const makeArray: (value: T) => T[]; const makeArray2: (array: any) => T[]; const eliminateDuplicates: (items: T[]) => T[]; const randWeightedArray: (numbers: number[]) => number[]; const copyOfArray: (array: any[]) => any[]; const createAndFillArray: (start: number, end: number, func: any) => any[]; const pluck: (prop: PropertyKey, ...values: T[]) => T[]; const unsortedRemoveDuplicates: (comparator: import("../../typings/function-types").BiProcessor, ...values: T[]) => T[]; const unsortedIntersect: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const unsortedExclusion: (comparator: import("../../typings/function-types").BiProcessor, ...array: T[]) => T[]; const unsortedSubtract: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const unsortedUnion: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const exclusion: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const removeDuplicates: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const intersect: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const union: (comparator: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const subtract: (compareFunction: import("../../typings/function-types").BiProcessor, array1: T[], array2: T[]) => T[]; const findArray: (array: number[], subArray: number[]) => number; const trueForAll: (match: Predicate, ...array: T[]) => boolean; const removeAt: (index: number, array: T[]) => void; /** * Inserts an element into the List at the specified index. * @param {Number} index The zero-based index at which item should be inserted. * @param {Object} item The object to insert. * @param array */ const insert: (index: number, item: any, array: any[]) => any[]; const search: (arr: any[], num: number, lowest: boolean) => number; const flatten: (...args: any[]) => any[]; const shuffle2: (array: any[]) => any[]; const shuffle3: (arr: any[]) => any[]; const removeValues: (data: any[], ...args: any[]) => any[]; const arrayShuffle: (array: any[]) => any[]; const toArray: (arr: any[], from?: number) => any[]; /** * https://jsperf.com/comparison-object-index-type * @param {number} count * @returns {Object|Array} */ const createObjectArray: (count: number) => any[]; const createObject: () => any; } //# sourceMappingURL=arrays.d.ts.map