aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utility.js b/src/utility.js
index b67e6c21..9cc8d3a3 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -298,12 +298,20 @@ function setIntersect(x, y) {
var ret = {};
for (xx in x) {
if (xx in y) {
- ret[xx] = true;
+ ret[xx] = 0;
}
}
return ret;
}
+function setUnion(x, y) {
+ var ret = set(keys(x));
+ for (yy in y) {
+ ret[yy] = 0;
+ }
+ return ret;
+}
+
function invertArray(x) {
var ret = {};
for (var i = 0; i < x.length; i++) {