Skip to content
Subhajit Sahu edited this page Jun 18, 2020 · 17 revisions

Updates values based on map function. 🏃 📼 📦 🌔 📒

Similar: map, reduce, filter, filterAt, reject, rejectAt.

lists.map(x, fm);
// x:  lists
// fm: map function (v, k, x)
const lists = require('extra-lists');

var x = [['a', 'b', 'c', 'd'], [1, 2, 3, 4]];
[...lists.map(x, v => v * 2)];
// [ [ 'a', 2 ], [ 'b', 4 ], [ 'c', 6 ], [ 'd', 8 ] ]

references

Clone this wiki locally