aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-12 13:00:09 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-12 13:00:09 -0700
commitc3ff344fc3e4a87232863a3864e7f10e96a32b10 (patch)
tree8d3f485f860e5f46c1c9eafcfa5ef58166d0b702 /src/utility.js
parent174c6def2ce5290c62513d411ead97db14ef06ee (diff)
unique ids for aborts for dead functions
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utility.js b/src/utility.js
index 8db37c61..19444675 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -267,6 +267,15 @@ function set() {
}
var unset = keys;
+function numberedSet() {
+ var args = typeof arguments[0] === 'object' ? arguments[0] : arguments;
+ var ret = {};
+ for (var i = 0; i < args.length; i++) {
+ ret[args[i]] = i;
+ }
+ return ret;
+}
+
function setSub(x, y) {
var ret = set(keys(x));
for (yy in y) {