An open API service indexing awesome lists of open source software.

https://github.com/seebigs/seebigs-each

Safely iterate over each item in an Object or Array
https://github.com/seebigs/seebigs-each

Last synced: about 2 months ago
JSON representation

Safely iterate over each item in an Object or Array

Awesome Lists containing this project

README

          

# seebigs-each

*Safely iterate over each item in an Object or Array*

# Install
```
$ npm install seebigs-each
```

# Use
```js
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
}
});
```