0.1.6 • Published 7 years ago

entries-find v0.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

entries-find

NOTE: entries-find was renamed to @extra-entries/find. NPM

Get first value in entries that satisfies the test, like Array.find().

const find = require('entries-find');
// find(<entries>, <test function>, [this], [begin=0], [end])
// - <test function>(<value>, <key>, <entries>)
// -> <first value>

find([5, 3, 9, 1, 1, 6].entries(), (v) => v>5);
// 9
find(new Set(['length', 'mass', 'time']).entries(), (v, k, ent) => k.includes('i'));
// 'time'
find(Object.entries({t: 20, i: 9, m: 13, e: 5}), (v, k, ent) => v<10);
// 9
0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago