Update npm packages (73 packages including @jqhtml 2.3.36)
Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
node_modules/webpack/lib/util/binarySearchBounds.js
generated
vendored
23
node_modules/webpack/lib/util/binarySearchBounds.js
generated
vendored
@@ -64,6 +64,11 @@ const compileSearch = (funcName, predicate, reversed, extraArgs, earlyOut) => {
|
||||
return code.join("");
|
||||
};
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @typedef {(items: T[], start: number, compareFn?: number | ((item: T, needle: number) => number), l?: number, h?: number) => number} Search
|
||||
*/
|
||||
|
||||
/**
|
||||
* This helper functions generate code for two binary search functions:
|
||||
* A(): Performs a binary search on an array using the comparison operator specified.
|
||||
@@ -74,7 +79,7 @@ const compileSearch = (funcName, predicate, reversed, extraArgs, earlyOut) => {
|
||||
* @param {boolean} reversed Whether the search should be reversed.
|
||||
* @param {SearchPredicateSuffix} suffix The suffix to be used in the function name.
|
||||
* @param {boolean=} earlyOut Whether the search should return as soon as a match is found.
|
||||
* @returns {(items: T[], start: number, compareFn?: number | ((item: T, needle: number) => number), l?: number, h?: number) => number} The compiled binary search function.
|
||||
* @returns {Search<T>} The compiled binary search function.
|
||||
*/
|
||||
const compileBoundsSearch = (predicate, reversed, suffix, earlyOut) => {
|
||||
const arg1 = compileSearch("A", `x${predicate}y`, reversed, ["y"], earlyOut);
|
||||
@@ -106,6 +111,14 @@ return dispatchBinarySearch";
|
||||
return result();
|
||||
};
|
||||
|
||||
const fns = {
|
||||
ge: compileBoundsSearch(">=", false, "GE"),
|
||||
gt: compileBoundsSearch(">", false, "GT"),
|
||||
lt: compileBoundsSearch("<", true, "LT"),
|
||||
le: compileBoundsSearch("<=", true, "LE"),
|
||||
eq: compileBoundsSearch("-", true, "EQ", true)
|
||||
};
|
||||
|
||||
/**
|
||||
* These functions are used to perform binary searches on arrays.
|
||||
* @example
|
||||
@@ -120,10 +133,4 @@ return dispatchBinarySearch";
|
||||
* const index2 = le(arr, 5); // index2 === 4
|
||||
* ```
|
||||
*/
|
||||
module.exports = {
|
||||
ge: compileBoundsSearch(">=", false, "GE"),
|
||||
gt: compileBoundsSearch(">", false, "GT"),
|
||||
lt: compileBoundsSearch("<", true, "LT"),
|
||||
le: compileBoundsSearch("<=", true, "LE"),
|
||||
eq: compileBoundsSearch("-", true, "EQ", true)
|
||||
};
|
||||
module.exports = fns;
|
||||
|
||||
Reference in New Issue
Block a user