seebigs-each

Safely iterate over each item in an Object or Array

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
seebigs-each
001.1.05 years ago5 years agoMinified + gzip package size for seebigs-each in KB

Readme

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