@f/foreach-obj
v1.1.1
Published
Iterate over an object
Downloads
2,413
Readme
foreach-obj
Iterate over an object.
Installation
$ npm install @f/foreach-obj
Usage
var forEach = require('@f/foreach-obj')
forEach(function (value, key, index) {
// do something
}, { a: 1, b: 2 })
API
forEach(fn, obj)
fn(value, key, index)
- Function you want to call for each element of the object. Called with the same context as forEach.- obj - The object you want to iterate over
Returns: void
License
MIT