npm.io
1.1.7 • Published 7 years ago

@extra-array/first

Licence
MIT
Version
1.1.7
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
17

Get first value of array.

const first = require('@extra-array/first');
// first(<array>, [index=0])

first(['g', 'a', 'r', 'f', 'i', 'e', 'l', 'd']);
// 'g'
first(['o', 'd', 'i', 'e'], 2);
// 'i'

With extra-array try Array.first() instead.


extra-array

Keywords