Skip to content

Commit 33e1468

Browse files
authored
Merge pull request #25 from Sykander/for-each-docs
For Each Docs
2 parents fe0a9ed + e2c1cfe commit 33e1468

File tree

3 files changed

+36
-20
lines changed

3 files changed

+36
-20
lines changed

README.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
# Iterable Async Methods
1+
# Iterable Async Methods
2+
[![Try iterable-async on RunKit](https://badge.runkitcdn.com/iterable-async.svg)](https://npm.runkit.com/iterable-async)
23

34
A collection of methods for looping iterable objects asynchronously using something similar to the Array api.
45

5-
## Methods
6-
7-
* Async Map
8-
* Async For Each
9-
* Async Filter
10-
* Async Find
11-
* Async Find Index
12-
13-
### Async Map
6+
## Installation
147

15-
Map an iterable object asynchronously
168
```
17-
function asyncMap(callback, [thisArg]) {...}
9+
$ npm install iterable-async
1810
```
1911

20-
### Async For Each
12+
## Methods
2113

22-
Loop over an iterable object asynchronously
23-
```
24-
function asyncForEach(callback, [thisArg]) {...}
25-
```
14+
* Async Filter
15+
* Async Find
16+
* Async Find Index
17+
* Async For Each
18+
* Async Map
2619

2720
### Async Filter
2821

@@ -42,9 +35,24 @@ function asyncFind(callback, [thisArg]) {...}
4235

4336
Find an item's index in an iterable object asynchronously
4437
```
45-
function asyncFindIndex(callback, [thisArg]) {...}
38+
async function asyncFindIndex(callback, [thisArg]) {...}
39+
```
40+
41+
### [Async For Each](https://github.com/Sykander/iterable-async/wiki/Async-For-Each)
42+
43+
Loop over an iterable object asynchronously
44+
```
45+
function asyncForEach(callback, [thisArg]) {...}
4646
```
4747

48+
### Async Map
49+
50+
Map an iterable object asynchronously
51+
```
52+
function asyncMap(callback, [thisArg]) {...}
53+
```
54+
55+
4856
## Development
4957

5058
Development is open to contribution, check the project board "Development" for tickets.

docs/playground.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const {
2+
asyncFind,
3+
asyncFindIndex,
4+
asyncFilter,
5+
asyncForEach,
6+
asyncMap
7+
} = require('iterable-async');

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "src",
66
"scripts": {
77
"test": "./node_modules/.bin/mocha test",
8-
"lint:fix": "./node_modules/.bin/eslint src test --fix && ./node_modules/.bin/prettier --write 'src/**/*.{js,ts,css,html}' --write 'test/**/*.{js,ts,css,html}'",
8+
"lint:fix": "./node_modules/.bin/prettier --write 'src/**/*.{js,ts,css,html}' --write 'test/**/*.{js,ts,css,html}' --write 'docs/**/*.{js,ts,css,html}'",
99
"lint:check": "./node_modules/.bin/eslint src test",
1010
"lint": "npm run lint:fix && npm run lint:check",
1111
"prepublishOnly": "npm run lint:check && npm test"
@@ -34,5 +34,6 @@
3434
"hooks": {
3535
"pre-commit": "npm run lint:check"
3636
}
37-
}
37+
},
38+
"runkitExampleFilename": "docs/playground.js"
3839
}

0 commit comments

Comments
 (0)