2.0.1 • Published 9 years ago

@ndhoule/some v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

some CI

Check if a predicate function returns true for any value in a collection.

Installation

$ component install ndhoule/some
$ npm install @ndhoule/some

API

some(predicate : Function, collection : Array|Object|String)

var isEven = function(num) { return num % 2 === 0; };

some(isEven, [1, 2, 3]); // => true
some(isEven, [1, 3, 5]); // => false
some(isEven, [2, 4, 6]); // => true

License

Released under the MIT license.