Compares two sets.
This is part of package extra-set.
This is browserified, minified version of @extra-set/compare.
It is exported as global variable set_compare.
CDN: unpkg, jsDelivr.
set.compare(x, y);
// x: a set
// y: another set
// → x=y: 0, otherwise: -ve/+ve
const 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