objects.forIn
jkvyff opened this issue · 1 comments
jkvyff commented
forIn iterates over own and inherited properties and invokes function on property with three arguments: (value, key, object). Returns input object.
Checklist
- implementation
- tests
- jsdoc
Details
function TestObj() {
this.a = 1;
this.b = 2;
}
TestObj.prototype.c = 3;
objects.forIn(new TestObj(), (value, key, object) {
console.log(key);
});
// Logs 'a', 'b', then 'c'
> { a: 1, b: 2}
References
evanplaice commented
Added in v0.63