Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/drulac/array-async-methods
- Owner: Drulac
- Created: 2017-10-08T08:41:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T08:55:02.000Z (about 7 years ago)
- Last Synced: 2024-04-25T04:22:21.066Z (7 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# array-async-methods
### available methods
* mapA
* forEachA
* filterA
* reduceA
* reduceRightA
* everyA
* someA
* findA
* findIndexAProvide 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', '')
```