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
- Host: GitHub
- URL: https://github.com/seebigs/seebigs-each
- Owner: seebigs
- Created: 2017-07-18T03:58:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T20:39:42.000Z (over 8 years ago)
- Last Synced: 2025-09-25T20:48:46.905Z (9 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
}
});
```