Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

each-component

0.1.0 • Public • Published

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

Keywords

none

install

npm i each-component

Downloadsweekly downloads

6

version

0.1.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability