- mapA
- forEachA
- filterA
- reduceA
- reduceRightA
- everyA
- someA
- findA
- findIndexA
Provide promise instead of callback. That's return a Promise.
install
npm i array-async-methods
just require in your code the module
require('array-async-methods');
These methods are also usable on Promise, it's chainable :
filesPath.mapA(filePath=>fsPromised.readFile(filePath,'utf8'))
.someA(async fileContent=>fileContent === 'good', '')