Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/drulac/array-async-methods

extends Array to have support Async methods
https://github.com/drulac/array-async-methods

Last synced: about 14 hours ago
JSON representation

extends Array to have support Async methods

Awesome Lists containing this project

README

        

# array-async-methods

### available methods

* mapA
* forEachA
* filterA
* reduceA
* reduceRightA
* everyA
* someA
* findA
* findIndexA

Provide promise instead of callback. That's return a Promise.

### usage
install
```
npm i array-async-methods
```
just require in your code the module
```js
require('array-async-methods');
```

### chainability
These methods are also usable on Promise, it's chainable :
```js
filesPath.mapA(filePath=>fsPromised.readFile(filePath,'utf8'))
.someA(async fileContent=>fileContent === 'good', '')
```