@extra-iterable/map
v2.5.22
Published
Updates values based on map function.
Downloads
127
Readme
Updates values based on map function. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Similar: map, filter, reject, reduce, accumulate.
This is part of package extra-iterable.
iterable.map(x, fm);
// x: an iterable
// fm: map function (v, i, x)
const iterable = require("extra-iterable");
var x = [1, 2, 3, 4];
[...iterable.map(x, v => v * 2)];
// [ 2, 4, 6, 8 ]