object-some
Array.prototype.filter
for objects.
Installation
npm install object-some
Usage
var assert = ;var objectSome = ; var o1 = a: 1 b: -1 c: 0 d: 42; ; // => `true`
API
objectSome(obj, iterator, this)
obj
(object
) - object to filter oniterator
(function
, required) - iterator functionthis
(optional) -this
foriterator
Iterates over obj
, calls iterator(value, key, obj)
with each item and
returns true
if it returns true
when iterator
returns true
, false otherwise.