Array.prototype.filter for objects.
var assert = require('assert');
var objfilter = require('../');
var o1 = {
a: 1,
b: -1,
c: 0,
d: 42
};
objfilter(o1, function (n) {
return n > 0;
}); // => `{ a: 1, d: 42 }`
objfilter(obj, iterator, this)obj (object) - object to filter oniterator (function, required) - iterator functionthis (optional) - this for iteratorCreates a new object with all the elements that pass the test implemented by
iterator.