seebigs-each

1.1.0 • Public • Published

seebigs-each

Safely iterate over each item in an Object or Array

Install

$ npm install seebigs-each

Use

var each = require('seebigs-each');

each(collection, function (value, key, collection) {
    if (value.indexOf('foo') !== -1) {
        console.log(value);
        return false; // return false to drop out of loop early
    }
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    256
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    256
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i seebigs-each

Weekly Downloads

256

Version

1.1.0

License

MIT

Last publish

Collaborators

  • seebigs