Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anywhichway/all
Collects all values for an iterable as an array
https://github.com/anywhichway/all
Last synced: about 4 hours ago
JSON representation
Collects all values for an iterable as an array
- Host: GitHub
- URL: https://github.com/anywhichway/all
- Owner: anywhichway
- License: mit
- Created: 2023-01-01T13:57:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T17:29:46.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T01:38:42.170Z (6 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# all
Collects all values for any iterable, promised iterable, or item that can be converted into an iterable as an array# Usage
```javascript
await all(item,what="values")
```
Item could be a generator, async generator, Set, etc.# How It Works
1. awaits `item` so that if it is a Promise, it resolves
2. calls @anywhichway/map to collect itemsSee https://www.npmjs.com/package/@anywhichway/map for usage of `what`.
# Release History (Reverse Chronological Order)
2023-01-04 v1.0.1 Updated documentation.
2023-01-04 v1.0.0 Updated to use @anywhichway/map v1.0.0 which has 95% test coverage.
2023-01-01 v0.0.1 Initial public release