Skip to content

Commit 05c174a

Browse files
📚 docs(README): Add code example and remove WIP warning.
1 parent 5ce7e30 commit 05c174a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
AsyncIterator to Array conversion for JavaScript.
55
See [docs](https://async-iterable-iterator.github.io/async-iterator-to-array/index.html).
66

7-
> :building_construction: Caveat emptor! This is work in progress. Code may be
8-
> working. Documentation may be present. Coherence may be. Maybe.
9-
107
> :warning: Depending on your environment, the code may require
118
> `regeneratorRuntime` to be defined, for instance by importing
129
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
1310
11+
```js
12+
import {asyncIteratorToArray} from '@async-iterable-iterator/async-iterator-to-array';
13+
14+
let asyncIterator = ...;
15+
let array = await asyncIteratorToArray(asyncIterator);
16+
```
17+
1418
[![License](https://img.shields.io/github/license/async-iterable-iterator/async-iterator-to-array.svg)](https://raw.githubusercontent.com/async-iterable-iterator/async-iterator-to-array/main/LICENSE)
1519
[![Version](https://img.shields.io/npm/v/@async-iterable-iterator/async-iterator-to-array.svg)](https://www.npmjs.org/package/@async-iterable-iterator/async-iterator-to-array)
1620
[![Tests](https://img.shields.io/github/workflow/status/async-iterable-iterator/async-iterator-to-array/ci?event=push&label=tests)](https://github.com/async-iterable-iterator/async-iterator-to-array/actions/workflows/ci.yml?query=branch:main)

0 commit comments

Comments
 (0)