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
27
frontend/node_modules/es-toolkit/dist/array/unzipWith.mjs
generated
vendored
Normal file
27
frontend/node_modules/es-toolkit/dist/array/unzipWith.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//#region src/array/unzipWith.ts
|
||||
/**
|
||||
* Unzips an array of arrays, applying an `iteratee` function to regrouped elements.
|
||||
*
|
||||
* @template T, R
|
||||
* @param target - The nested array to unzip. This is an array of arrays,
|
||||
* where each inner array contains elements to be unzipped.
|
||||
* @param iteratee - A function to transform the unzipped elements.
|
||||
* @returns A new array of unzipped and transformed elements.
|
||||
*
|
||||
* @example
|
||||
* const nestedArray = [[1, 2], [3, 4], [5, 6]];
|
||||
* const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3);
|
||||
* // result will be [9, 12]
|
||||
*/
|
||||
function unzipWith(target, iteratee) {
|
||||
const maxLength = Math.max(...target.map((innerArray) => innerArray.length));
|
||||
const result = new Array(maxLength);
|
||||
for (let i = 0; i < maxLength; i++) {
|
||||
const group = new Array(target.length);
|
||||
for (let j = 0; j < target.length; j++) group[j] = target[j][i];
|
||||
result[i] = iteratee(...group);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//#endregion
|
||||
export { unzipWith };
|
||||
Loading…
Add table
Add a link
Reference in a new issue