npm.io
1.0.1 • Published 10 years ago

js-tail

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

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]

Keywords