Array / object / string iteration utility
npm install compat-eachArray / object / string iteration utility.
component-each forked for complete Duo and Browserify compatibility.
$ npm install compat-each
Iterate an array:
``js
each([1,2,3], function(num, i){
})
`
Optionally pass a context object:
`js
each([1,2,3], function(num, i){
}, this)
`
Iterate an object's key / value pairs:
`js
each(conf, function(key, val){
})
`
Iterate an array-ish object (has numeric .length):
`js
each(collection, function(val, i){
})
`
Iterate a string's characters:
`js
each('hello', function(c, i){
})
``
MIT