reports/frontend/node_modules/es-toolkit/dist/array/flattenDeep.js
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

18 lines
501 B
JavaScript

const require_flatten = require("./flatten.js");
//#region src/array/flattenDeep.ts
/**
* Flattens all depths of a nested array.
*
* @template T - The type of elements within the array.
* @param arr - The array to flatten.
* @returns A new array that has been flattened.
*
* @example
* const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]);
* // Returns: [1, 2, 3, 4, 5, 6]
*/
function flattenDeep(arr) {
return require_flatten.flatten(arr, Infinity);
}
//#endregion
exports.flattenDeep = flattenDeep;