| Current Path : /usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/function/ |
| Current File : //usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/function/rest.mjs |
function rest(func, startIndex = func.length - 1) {
return function (...args) {
const rest = args.slice(startIndex);
const params = args.slice(0, startIndex);
while (params.length < startIndex) {
params.push(undefined);
}
return func.apply(this, [...params, rest]);
};
}
export { rest };