-
Notifications
You must be signed in to change notification settings - Fork 1
head
Subhajit Sahu edited this page Dec 5, 2022
·
16 revisions
Get first entry from map (default order).
function head(x, ed)
// x: a map
// ed: default entry
const map = require('extra-map');
var x = new Map([['a', 1], ['b', 2], ['c', 3]]);
map.head(x);
// → [ 'a', 1 ]
var x = new Map();
map.head(x);
// → []