Returns all but the first N of a list of ordered values


Keywords
unction, functional
License
ICU
Install
npm install @unction/dropfirst@8.13.0

Documentation

@unction/dropFirst

Tests Stability Dependencies

number => OrderedArray | Set | Record<string | number | symbol, B> | Map<B, A> | string => OrderedArray | Set | Record<string | number | symbol, B> | Map<B, A> | string

Returns all but the first N of a list of ordered values.

dropFirst(2)([1, 2, 3]) // [3]
dropFirst(1)([1, 2, 3]) // [2, 3]
dropFirst(2)("abc") // "c"
dropFirst(1)("abc") // "bc"