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

Joins entries together. 🏃 📼 📦 🌔 📒

entries.join(x, [sep], [asc]);
// x:   entries
// sep: separator (,)
// asc: associator (=)
const entries = require('extra-entries');

var x = new Map([['a', 1], ['b', 2], ['c', 3]]);
map.join(x);
// 'a=1,b=2,c=3'

map.join(x, ', ', ' => ');
// 'a => 1, b => 2, c => 3'

references

Clone this wiki locally