@cowprotocol/cow-sdk
Version:
<p align="center"> <img width="400" src="https://github.com/cowprotocol/cow-sdk/raw/main/docs/images/CoW.png" /> </p>
27 lines (16 loc) • 891 B
Markdown
# it-all
[](https://github.com/achingbrain/it/actions/workflows/test.yml) [](https://coveralls.io/github/achingbrain/it?branch=master) [](https://david-dm.org/achingbrain/it?path=packages/it-all)
> Collects all values from an (async) iterable into an array and returns it.
For when you need a one-liner to collect iterable values.
## Install
```sh
$ npm install --save it-all
```
## Usage
```javascript
const all = require('it-all')
// This can also be an iterator, async iterator, generator, etc
const values = [0, 1, 2, 3, 4]
const arr = await all(values)
console.info(arr) // 0, 1, 2, 3, 4
```