Your IP : 216.73.216.74


Current Path : /usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/function/
Upload File :
Current File : //usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/function/after.mjs

function after(n, func) {
    if (!Number.isInteger(n) || n < 0) {
        throw new Error(`n must be a non-negative integer.`);
    }
    let counter = 0;
    return (...args) => {
        if (++counter >= n) {
            return func(...args);
        }
        return undefined;
    };
}

export { after };