From bf6098f986450dad312a8ceacd3c02415e93f722 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Wed, 11 May 2011 13:08:59 -0400 Subject: [PATCH] closure-compiler comment, plus semicolons. --- underscore.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/underscore.js b/underscore.js index 1688e42fa..84fc889ee 100644 --- a/underscore.js +++ b/underscore.js @@ -55,6 +55,7 @@ module.exports = _; _._ = _; } else { + // Exported as a string, for Closure Compiler "advanced" mode. root['_'] = _; } @@ -256,10 +257,10 @@ var result = {}; each(obj, function(value, index) { var key = iterator(value, index); - (result[key] || (result[key] = [])).push(value) + (result[key] || (result[key] = [])).push(value); }); return result; - } + }; // Use a comparator function to figure out at what index an object should // be inserted so as to maintain order. Uses binary search.