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 11# Async Iterable Prefetch
22
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 )
76[ ![ 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**
811
912## Usage
1013
1114### Simple
1215
1316``` javascript
14- const { map } = require ( ' buffered-async-iterable' ) ;
17+ import { map } from ' buffered-async-iterable' ;
1518
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+ });
2022
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+ }
2526```
26-
27- TODO: Add syntax documentation
You can’t perform that action at this time.
0 commit comments