Skip to content
forked from component/each

Object / array / array-ish / string iteration utility

Notifications You must be signed in to change notification settings

juliangruber/each

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Object / array / array-ish / string iteration utility

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%