import predicateType from '../helpers/predicateType'; /** * Applies the provided function to each element of an array and then flattens the result. * * @since 1.0.0 * * @param {Array|Object} collection - The array to iterate over. * @param {Function} iteratee - The function to apply to each element of the array. * * @returns {Array} - A new flattened array. * * @example * flatMap([1, 2, 3], (n) => [n, n * 2]); * // => [1, 2, 2, 4, 3, 6] * * flatMap(['hello', 'world'], (word) => word.split('')); * // => ['h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd'] */ declare const flatMap: (collection: T, iteratee?: predicateType) => T; export default flatMap;