foreach
foreach component + npm package
Last updated 6 years ago by manuelstofer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install foreach 
SYNC missed versions from official npm registry.

foreach

Iterate over the key value pairs of either an array-like object or a dictionary like object.

browser support

API

foreach(object, function, [context])

var each = require('foreach');

each([1,2,3], function (value, key, array) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // array === [1, 2, 3]
});

each({0:1,1:2,2:3}, function (value, key, object) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // object === {0:1,1:2,2:3}
});

Current Tags

  • 2.0.5                                ...           latest (6 years ago)

7 Versions

  • 2.0.5                                ...           6 years ago
  • 2.0.4                                ...           7 years ago
  • 2.0.3                                ...           7 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.3.3                                ...           7 years ago
Maintainers (1)
Downloads
Today 1,007
This Week 4,539
This Month 38,237
Last Day 3,532
Last Week 20,638
Last Month 79,488
Dependencies (0)
None
Dev Dependencies (2)
Dependents (159)

Copyright 2014 - 2016 © taobao.org |