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

foreach

CDNJS

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.6                                ...           latest (3 years ago)

8 Versions

  • 2.0.6                                ...           3 years ago
  • 2.0.5                                ...           10 years ago
  • 2.0.4                                ...           11 years ago
  • 2.0.3                                ...           12 years ago
  • 2.0.2                                ...           12 years ago
  • 2.0.1                                ...           12 years ago
  • 2.0.0                                ...           12 years ago
  • 1.3.3                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |