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
36
frontend/node_modules/es-toolkit/dist/fp/array/dropWhile.js
generated
vendored
Normal file
36
frontend/node_modules/es-toolkit/dist/fp/array/dropWhile.js
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
const require_dropWhile = require("../../array/dropWhile.js");
|
||||
const require_lazy = require("../_internal/lazy.js");
|
||||
//#region src/fp/array/dropWhile.ts
|
||||
/**
|
||||
* Creates a function that removes leading values while a predicate returns true.
|
||||
*
|
||||
* Once the predicate returns false, that value and all following values are
|
||||
* emitted. The returned function is lazy-capable inside {@link pipe}.
|
||||
*
|
||||
* @template T - The type of elements in the array.
|
||||
* @param predicate - Called with each leading value and index while values are being dropped.
|
||||
* @returns A function that maps the piped array to the remaining suffix.
|
||||
*
|
||||
* @example
|
||||
* import { dropWhile, pipe } from 'es-toolkit/fp';
|
||||
*
|
||||
* pipe([1, 2, 3, 1], dropWhile(value => value < 3));
|
||||
* // => [3, 1]
|
||||
*/
|
||||
function dropWhile(predicate) {
|
||||
function dropWhileEager(array) {
|
||||
return require_dropWhile.dropWhile(array, (item, index) => predicate(item, index));
|
||||
}
|
||||
const dropWhileLazy = (emit) => {
|
||||
let dropping = true;
|
||||
let index = 0;
|
||||
return (value) => {
|
||||
if (dropping && predicate(value, index++)) return true;
|
||||
dropping = false;
|
||||
return emit(value);
|
||||
};
|
||||
};
|
||||
return require_lazy.combineEagerAndLazyFunctions(dropWhileEager, dropWhileLazy);
|
||||
}
|
||||
//#endregion
|
||||
exports.dropWhile = dropWhile;
|
||||
Loading…
Add table
Add a link
Reference in a new issue