Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cae411eae7
commit
1c411e402e
19809 changed files with 1962608 additions and 97 deletions
22
frontend/node_modules/es-toolkit/dist/compat/array/flatMap.mjs
generated
vendored
Normal file
22
frontend/node_modules/es-toolkit/dist/compat/array/flatMap.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { isNil } from "../../predicate/isNil.mjs";
|
||||
import { flattenDepth } from "./flattenDepth.mjs";
|
||||
import { map } from "./map.mjs";
|
||||
//#region src/compat/array/flatMap.ts
|
||||
/**
|
||||
* Creates a flattened array of values by running each element in collection through iteratee and flattening the mapped results.
|
||||
*
|
||||
* @template R
|
||||
* @param collection - The collection to iterate over.
|
||||
* @param [iteratee] - The function invoked per iteration.
|
||||
* @returns Returns the new flattened array.
|
||||
*
|
||||
* @example
|
||||
* flatMap([1, 2], n => [n, n * 2]);
|
||||
* // => [1, 2, 2, 4]
|
||||
*/
|
||||
function flatMap(collection, iteratee) {
|
||||
if (isNil(collection)) return [];
|
||||
return flattenDepth(isNil(iteratee) ? map(collection) : map(collection, iteratee), 1);
|
||||
}
|
||||
//#endregion
|
||||
export { flatMap };
|
||||
Loading…
Add table
Add a link
Reference in a new issue