diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-16 13:41:37 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-16 13:41:37 -0700 |
commit | b0d268d121d8868be33d8633b09499b34a4db45f (patch) | |
tree | d67eaf4f5e200b5b5f57099c46a1413d43cbd287 /src/utility.js | |
parent | 6b730836aa53f6b4896f24dd8a4b456669ae4f1a (diff) | |
parent | 475e72dc5539d9c59fc267927441a502c14a178f (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/utility.js')
-rw-r--r-- | src/utility.js | 10 |
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++) { |