lib/array.js
function $slice(params) {
    if (
        Array.isArray(params) &&
        (params.length === 2 || params.length === 3) &&
        Array.isArray(params[0]) &&
        typeof params[1] === 'number' &&
        (params[2] === undefined || typeof params[2] === 'number')
    ) {
        return params[0].slice(params[1], params[2]);
    }
    throw new Error(
        '$slice expects an array of two or three elements of which the first must be an array and the second/third be a number'
    );
}
function $slice(params) {
    if (
        Array.isArray(params) &&
        (params.length === 2 || params.length === 3) &&
        Array.isArray(params[0]) &&
        typeof params[1] === 'number' &&
        (params[2] === undefined || typeof params[2] === 'number')
    ) {
        return params[0].slice(params[1], params[2]);
    }
    throw new Error(
        '$slice expects an array of two or three elements of which the first must be an array and the second/third be a number'
    );
}
function $slice ( params ) { if ( Array . isArray ( params ) && ( params . length === 2 || params . length === 3 ) && Array . isArray ( params [ 0 ] ) && typeof params [ 1 ] === 'number' && ( params [ 2 ] === undefined || typeof params [ 2 ] === 'number' ) ) { return params [ 0 ] . slice ( params [ 1 ] , params [ 2 ] ) ; } throw new Error ( '$slice expects an array of two or three elements of which the first must be an array and the second/third be a number' ) ; }
Slice an array from the given index to an optional end index

@param {[any[], number]|[any[], number, number]} params
@returns {any[]}
Slice an array from the given index to an optional end index