const require_flatMapDepth = require("./flatMapDepth.js"); //#region src/compat/array/flatMapDeep.ts /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @template T, R * @param {Record> | T> | Record> | T> | ArrayLike | object | null | undefined} collection - The array or object to iterate over. * @param {((value: T, index: number, array: ArrayLike) => ArrayLike> | R) | ((value: T[keyof T], key: string, object: T) => ArrayLike> | R) | string | object} [iteratee] - The function that produces the new array elements. * @returns {T[] | R[] | any[] | boolean[]} A new array that has been deeply flattened. * * @example * flatMapDeep([1, 2, 3], n => [[n, n]]); * // => [1, 1, 2, 2, 3, 3] */ function flatMapDeep(collection, iteratee) { return require_flatMapDepth.flatMapDepth(collection, iteratee, Infinity); } //#endregion exports.flatMapDeep = flatMapDeep;