Your IP : 216.73.216.74


Current Path : /usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/math/
Upload File :
Current File : //usr/local/lib/node_modules/@google/gemini-cli/node_modules/es-toolkit/dist/math/rangeRight.js

'use strict';

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

function rangeRight(start, end, step = 1) {
    if (end == null) {
        end = start;
        start = 0;
    }
    if (!Number.isInteger(step) || step === 0) {
        throw new Error(`The step value must be a non-zero integer.`);
    }
    const length = Math.max(Math.ceil((end - start) / step), 0);
    const result = new Array(length);
    for (let i = 0; i < length; i++) {
        result[i] = start + (length - i - 1) * step;
    }
    return result;
}

exports.rangeRight = rangeRight;