`Array.prototype.some` for objects
npm install object-someArray.prototype.filter for objects.
``sh`
npm install object-some
`js
var assert = require('assert');
var objectSome = require('object-some');
var o1 = {
a: 1,
b: -1,
c: 0,
d: 42
};
objectSome(o1, function (n) {
return n > 0;
}); // => true
objectSome(o1, function (n) {
return n === 100'
}); // => false`
* obj (object) - object to filter oniterator
* (function, required) - iterator functionthis
* (optional) - this for iterator
Iterates over obj, calls iterator(value, key, obj) with each item andtrue
returns if it returns true when iterator returns true`, false otherwise.