npm install ai-map

> Map over async iterables
The map() function creates a new async iterable with the results of calling a
provided function on every element in the async iterable.
> **_This module is part of
> Async iterable fun, a complete toolset
> of modules to work with async iterables._**
description of the example
``js
import aiMap from 'ai-map';
for (const item of {aiMap}()) {
yield item;
};
`
This will output
`
`
Creates a new async iterable with the results of calling a
provided function on every element in the async iterable.
Parameters
- data AsyncIterable The async iterable to map overtransform
- Function Function to apply to each element in the async iterable, taking 3 arguments:`
.
__currentValue__ - The current element being processed in the async iterable.
__currentIndex__ - The index of the current element being processed in the async
iterable. Starts at index 0
__data__ - The async iterable map was called upon.
`
Returns AyncIterable An iterable that iterates over the transform calls results.
Higher order function that partially apply transform to the
map function.
Parameters
- transform Function The transform argument to partially apply to map
Returns Function A map unary function that take a data argument
and return a new async iterable.
With npm installed, run
`bash`
npm install --save ai-map
- parro-it/ai-fun
- noffle/common-readme`
MIT Licensed © 2017 Andrea Parodi