Checks if any value satisfies a test.

Downloads in past


512.5.222 years ago3 years agoMinified + gzip package size for @extra-iterable/some.min in KB


Checks if any value satisfies a test. :package: :smileycat: :running: :vhs: :moon: :scroll: :newspaper: :bluebook:
Similar: some, every.

This is part of package extra-iterable.

This is browserified, minified version of @extra-iterable/some.
It is exported as global variable iterablesome.
CDN: unpkg
, jsDelivr.

iterable.some(x, [ft]);
// x:  an iterable
// ft: test function (v, i, x)

const iterable = require("extra-iterable");

var x = [1, 2, -3, -4];
iterable.some(x, v => v > 10);
// false

iterable.some(x, v => v < 0);
// true