File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 1
1
# Async Iterable Prefetch
2
2
3
- TODO: Fill in
4
-
5
- [ ![ js-semistandard-style] ( https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg )] ( https://github.com/voxpelli/eslint-config )
6
- [ ![ ES Module Ready Badge] ( https://img.shields.io/badge/es%20module%20ready-yes-success.svg )] ( https://esmodules.dev/ )
3
+ [ ![ npm version] ( https://img.shields.io/npm/v/buffered-async-iterable.svg?style=flat )] ( https://www.npmjs.com/package/buffered-async-iterable )
4
+ [ ![ npm downloads] ( https://img.shields.io/npm/dm/buffered-async-iterable.svg?style=flat )] ( https://www.npmjs.com/package/buffered-async-iterable )
5
+ [ ![ Module type: ESM] ( https://img.shields.io/badge/module%20type-esm-brightgreen )] ( https://github.com/voxpelli/badges-cjs-esm )
7
6
[ ![ Types in JS] ( https://img.shields.io/badge/types_in_js-yes-brightgreen )] ( https://github.com/voxpelli/types-in-js )
7
+ [ ![ js-semistandard-style] ( https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg )] ( https://github.com/voxpelli/eslint-config )
8
+ [ ![ Follow @voxpelli @mastodon.social] ( https://img.shields.io/mastodon/follow/109247025527949675?domain=https%3A%2F%2Fmastodon.social&style=social )] ( https://mastodon.social/@voxpelli )
9
+
10
+ ** WORK IN PROGRESS – early unpolished prerelease**
8
11
9
12
## Usage
10
13
11
14
### Simple
12
15
13
16
``` javascript
14
- const { map } = require ( ' buffered-async-iterable' ) ;
17
+ import { map } from ' buffered-async-iterable' ;
15
18
16
- (async () => {
17
- const mappedData = map (asyncIterable, async (item ) => {
18
- // Apply additional async lookup / processing
19
- });
19
+ const mappedData = map (asyncIterable, async (item ) => {
20
+ // Apply additional async lookup / processing
21
+ });
20
22
21
- for await (const item of mappedData ) {
22
- // Consume the buffered async iterable
23
- }
24
- })();
23
+ for await (const item of mappedData ) {
24
+ // Consume the buffered async iterable
25
+ }
25
26
```
26
-
27
- TODO: Add syntax documentation
You can’t perform that action at this time.
0 commit comments