-
Notifications
You must be signed in to change notification settings - Fork 1
compare
Subhajit Sahu edited this page Dec 2, 2022
·
14 revisions
Compare two sets.
function compare(x, y)
// x: a set
// y: another setconst set = require('extra-set');
var x = new Set([1, 2]);
var y = new Set([1, 2, 3]);
set.compare(x, y);
// → -1
var y = new Set([1, 2]);
set.compare(x, y);
// → 0
var y = new Set([1, -2]);
set.compare(x, y);
// → 1