Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Object / array / array-ish / string iteration utility
JavaScript
tree: 0404f68c8a

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

each

Array / object / string iteration utility.

Installation

$ component install component/each

API

each(array, fn)

Iterate an array:

each([1,2,3], function(num, i){

})

each(object, fn)

Iterate an object's key / value pairs:

each(conf, function(key, val){

})

Iterate an array-ish object (has numeric .length):

each(collection, function(val, i){

})

each(string, fn)

Iterate a string's characters:

each('hello', function(c, i){

})

License

MIT

Something went wrong with that request. Please try again.