more progress on the compressor (WIP)

This commit is contained in:
Mihai Bazon
2012-09-10 15:54:17 +03:00
parent 16b12c6287
commit a41e6cfabb
4 changed files with 134 additions and 20 deletions

View File

@@ -97,9 +97,9 @@ function repeat_string(str, i) {
};
function defaults(args, defs) {
var ret = {};
if (args === true)
args = {};
var ret = args || {};
for (var i in defs) if (HOP(defs, i)) {
ret[i] = (args && HOP(args, i)) ? args[i] : defs[i];
}