0.0.1 • Published 3 years ago
@anywhichway/map v0.0.1
map
Map for any iterable, promised iterable, or item that can be converted into an iterable.
Usage
await map(item,func,what="values")The 'item' could be a generator, async generator, Set, etc.
How It Works
- awaits
itemso that if it is a Promise, it resolves - tries to use
- native
mapon `item for await(value of await item)directly on theitemfor await()on the result of calling the method with thewhatname on item or ifwhatis a function its return value when passeditemfor await()on the result of using nativeforEach, if available on item, to collect values fromitem
- native
Release History (Reverse Chronological Order)
2023-01-04 v1.0.0 Added unit tests, 95.83% test coverage
2023-01-01 v0.0.1 Initial public release