bearray
ʕ·ᴥ·ʔ says: "Hey there!"
Installation
$ npm i bearray --save
or
$ yarn add bearray
Methods
filter
Ƹ̵̡Ӝ̵̨̄Ʒ
Filter an array.
; const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·; ᕕ·ᐛ·ᕗ // [2, 4]
map
ʕʘ̅͜ʘ̅ʔ
Map over an array.
; const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·; ᕕ·ᐛ·ᕗ // [2, 4, 6, 8]
reduce
ಠ_ಠ
Reduce an array.
; const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·; ᕕ·ᐛ·ᕗ // [10]
getValue
ʕᵔᴥᵔʔ
Get the value at the end of some chained operations (see other functions as well).
; const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·; ᕕ·ᐛ·ᕗ // [1, 2, 3, 4]