1.1.1 • Published 5 years ago

@extra-lists/last v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Get last value in lists, like Array[length-1].

const last = require('@extra-lists/last');
// last(<lists>)

a = ['world', 'of', 'goo'];
last([a.keys(), a]);
// [2, 'goo']
a = {w1: 'years', w2: 'of', w3: 'work'};
last([Object.keys(a), Object.values(a)]);
// ['w3', 'work']

extra-lists