Const
Projects each element of the source iterable into a new form.
Curried version of _map.
Element type produced by the source iterable.
Element type produced by the selector.
Selector receiving each element and its index, producing the projected value.
A deferred iterable yielding the selector results for each source element.
Error Rethrows any error thrown by selector.
selector
const squares = [..._map([1, 2, 3], (value) => value * value)];console.log(squares); // [1, 4, 9] Copy
const squares = [..._map([1, 2, 3], (value) => value * value)];console.log(squares); // [1, 4, 9]
or using the curried version:
const squares = [ ...pipeInto( [1, 2, 3], map((value) => value * value) ),];console.log(squares); // [1, 4, 9] Copy
const squares = [ ...pipeInto( [1, 2, 3], map((value) => value * value) ),];console.log(squares); // [1, 4, 9]
Projects each element of the source iterable into a new form.
Curried version of _map.