4each

forEach but for everything

Usage no npm install needed!

<script type="module">
  import each from 'https://cdn.skypack.dev/4each';
</script>

README

4each NPM version NPM downloads Build Status

forEach but for everything

Install

$ npm install --save 4each

Usage

const each = require('4each')

// Array
each([1, 2, 3], (value, index) => {})
// Dom NodeList
each(document.querySelectorAll('div'), (element, index) => {})
// Plain Object
each({foo: 0, bar: 1}, (value, key) => {})

License

MIT © EGOIST