loopOverObject
GitHub | NPM | @jelmerdemaat
Small, safe JavaScript function that correctly loops over an object.
- ES6 ready.
- Promise based, resolves for each item.
- Filters array on
object.hasOwnProperty
to check if the property really exists.
Usage
Add to your dependencies:
npm install --save loop-over-object # or shorter: npm i -S loop-over-object
Use in your JS:
; const object = name: 'Jelmer' color: 'red' cape: false; ;