0.1.3 • Published 6 years ago

iterable-someof v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

iterable-someof

NOTE: iterable-someof was renamed to @extra-iterable/some. NPM

Check if atleast one value in iterable passes the test, like Array.some().

const someOf = require('iterable-someof');
// someOf(<iterable>, <test function>, [this], [begin=0], [end])
// - <test function>(<value>, <index>, <iterable>)

someOf(new Set(['vajpayee', 'modi', 'rahul']), (v) => v.includes('rahul'));
// true
someOf([1, 0, 0, 1], (v, i, itr) => !!v, null, 1);
// true
someOf([1, 0, 0, 1], (v, i, itr) => !!v, null, 1, 3);
// false
0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago