each-component

v0.1.0
Array / object / string iteration utility

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

npm i each-component

Metadata

  • Unknown
  • Whatever
  • Unknown
  • released 1/21/2014

Downloads