js-tail
v1.0.1
Published
Get a list of last elements, without the first one, in iterable collection
Downloads
3
Readme
js-tail
Get a list of last elements, without the first one, in iterable collection
A common way of getting the last elements in a collection which implements Iterable protocol.
Installation
$ npm i js-tail
Usage
import tail from 'js-tail';
tail([1, 2, 3]); // [2, 3]
tail(new Set([1, 2, 3])); // [2, 3]
tail(Immutable.List([1, 2, 3])); // [2, 3]