1.1.0 • Published 6 years ago

seebigs-each v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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
    }
});