-
Notifications
You must be signed in to change notification settings - Fork 1
head
Subhajit Sahu edited this page Dec 2, 2022
·
18 revisions
Get first value from set (default order).
function head(x, vd?)
// x: a set
// vd: default value
const set = require('extra-set');
var x = new Set([1, 2, 3]);
set.head(x);
// → 1
var x = new Set();
set.head(x, -1);
// → -1