1.1.1 • Published 5 years ago

@extra-lists/first v1.1.1

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

Get first value in lists, like Array[0].

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

a = ['singh', 'is', 'king'];
first([a.keys(), a]);
// [0, 'singh']
a = {w1: 'chakh', w2: 'de', w3: 'phatte'};
first([Object.keys(a), Object.values(a)]);
// ['w1', 'chakh']

extra-lists