aboutsummaryrefslogtreecommitdiff
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 15eed9ba..c95b9824 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -255,6 +255,14 @@ Dictionary.prototype = {
this._values["$" + key] = val;
return this;
},
+ add: function(key, val) {
+ if (this.has(key)) {
+ this.get(key).push(val);
+ } else {
+ this.set(key, [ val ]);
+ }
+ return this;
+ },
get: function(key) { return this._values["$" + key] },
del: function(key) {
if (this.has(key)) {