Skip to content

Commit b291daa

Browse files
committed
Update readme
1 parent 20dad69 commit b291daa

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
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

0 commit comments

Comments
 (0)