dei
A delayed iterators
npm i dei
Usage
const { map } = require('dei')
async () => {
await map([1, 2, 3], n => n ** 2, 100)
}
Methods
forEach
map
reduce
reduceRight
Old browsers
webpack with Babel example
module.exports = {
module:{
loaders: [
{ test: /\.js$/, loader: 'babel', exclude: /node_modules(?!\/dei)/ },
],
},
...
}
Contributing
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
License
MIT
© sugarshin