Your IP : 216.73.216.74


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

'use strict';

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

const toInteger = require('../compat/util/toInteger.js');

function takeRight(arr, count = 1, guard) {
    count = guard || count === undefined ? 1 : toInteger.toInteger(count);
    if (count <= 0 || arr == null || arr.length === 0) {
        return [];
    }
    return arr.slice(-count);
}

exports.takeRight = takeRight;