0.1.3 • Published 7 years ago

iterable-someof v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 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

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago