/** * @param {Array} arr An array to process. */ export declare function to2dArray(arr: unknown[]): void; /** * @param {Array} arr An array to extend. * @param {Array} extension The data to extend from. */ export declare function extendArray(arr: unknown[], extension: unknown[]): void; /** * @param {Array} arr An array to pivot. * @returns {Array} */ export declare function pivot(arr: unknown[][]): unknown[]; /** * A specialized version of `.reduce` for arrays without support for callback * shorthands and `this` binding. * * {@link https://github.com/lodash/lodash/blob/master/lodash.js}. * * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {A} [accumulator] The initial value. * @param {boolean} [initFromArray] Specify using the first element of `array` as the initial value. * @returns {A} Returns the accumulated value. */ export declare function arrayReduce(array: T[] | Iterable, iteratee: (acc: A, value: T, index: number, array: T[]) => A, accumulator: A, initFromArray?: boolean): A; /** * A specialized version of `.filter` for arrays without support for callback * shorthands and `this` binding. * * {@link https://github.com/lodash/lodash/blob/master/lodash.js}. * * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ export declare function arrayFilter(array: T[] | Iterable, predicate: (value: T, index: number, array: T[]) => unknown): T[]; /** * A specialized version of `.map` for arrays without support for callback * shorthands and `this` binding. * * @param {Array} array The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ export declare function arrayMap(array: T[] | Iterable, iteratee: (value: T, index: number, array: T[]) => U): U[]; /** * A specialized version of `.forEach` for arrays without support for callback * shorthands and `this` binding. * * {@link https://github.com/lodash/lodash/blob/master/lodash.js}. * * @param {Array|*} array The array to iterate over or an any element with implemented iterator protocol. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ export declare function arrayEach(array: T[] | Iterable, iteratee: (value: T, index: number, array: T[]) => unknown): T[]; /** * Calculate sum value for each item of the array. * * @param {Array} array The array to process. * @returns {number} Returns calculated sum value. */ export declare function arraySum(array: number[]): number; /** * Returns the highest value from an array. Can be array of numbers or array of strings. * NOTICE: Mixed values is not supported. * * @param {Array} array The array to process. * @returns {number} Returns the highest value from an array. */ export declare function arrayMax(array: number[]): number; /** * Returns the lowest value from an array. Can be array of numbers or array of strings. * NOTICE: Mixed values is not supported. * * @param {Array} array The array to process. * @returns {number} Returns the lowest value from an array. */ export declare function arrayMin(array: number[]): number; /** * Calculate average value for each item of the array. * * @param {Array} array The array to process. * @returns {number} Returns calculated average value. */ export declare function arrayAvg(array: number[]): number; /** * Flatten multidimensional array. * * @param {Array} array Array of Arrays. * @returns {Array} */ export declare function arrayFlatten(array: unknown[]): unknown[]; /** * Unique values in the array. * * @param {Array} array The array to process. * @returns {Array} */ export declare function arrayUnique(array: T[]): T[]; /** * Differences from two or more arrays. * * @param {...Array} arrays Array of strings or array of numbers. * @returns {Array} Returns the difference between arrays. */ export declare function getDifferenceOfArrays(...arrays: Array): T[]; type IntersectionComparator = (a: string | number, b: string | number) => boolean; type IntersectionArg = Array | IntersectionComparator; /** * Intersection of two or more arrays. * * @param {...Array<*|Function>} args Array of elements followed by a comparator function. * @returns {Array} Returns elements that exists in every array. */ export declare function getIntersectionOfArrays(...args: IntersectionArg[]): (string | number)[]; /** * Union of two or more arrays. * * @param {...Array} arrays Array of strings or array of numbers. * @returns {Array} Returns the elements that exist in any of the arrays, without duplicates. */ export declare function getUnionOfArrays(...arrays: Array>): (string | number)[]; /** * Convert a separated strings to an array of strings. * * @param {string} value A string of class name(s). * @param {string|RegExp} delimiter The pattern describing where each split should occur. * @returns {string[]} Returns array of string or empty array. */ export declare function stringToArray(value: string, delimiter?: string | RegExp): string[]; /** * Convert an array of strings to a single string. * * @param {string[]} array Array of strings. * @param {string} separator Separator string. * @returns {string} Returns a string made by joining all array elements with a separator. */ export declare function arrayToString(array: string[], separator?: string): string; export {};