UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

27 lines (26 loc) 523 B
/** * Creates a slice of `array` with `n` elements dropped from the beginning. * * @since 5.16.0 * @category Array * @param array The array to query. * @param n The number of elements to drop. * @returns Returns the slice of `array`. * @example * * ```ts * drop([1, 2, 3]) * // => [2, 3] * * drop([1, 2, 3], 2) * // => [3] * * drop([1, 2, 3], 5) * // => [] * * drop([1, 2, 3], 0) * // => [1, 2, 3] * ``` */ export declare function drop<T>(array: Array<T>, n?: number): Array<T>; export default drop;