Skip to content
Subhajit Sahu edited this page Dec 5, 2022 · 6 revisions

Join entries together into a string.


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

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