UNPKG

super-utils-plus

Version:

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience

18 lines (17 loc) 400 B
/** * Creates a slice of array from start up to, but not including, end. * * @param array - The array to slice * @param start - The start position * @param end - The end position * @returns The slice of array * * @example * ```ts * const arr = [1, 2, 3, 4]; * * slice(arr, 1, 3); * // => [2, 3] * ``` */ export declare function slice<T>(array: T[], start?: number, end?: number): T[];