From 689cd97e03a21b87567f9c615c8aa08890d19e6c Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sun, 6 Dec 2009 13:16:44 -0500 Subject: [PATCH] pushed all hasOwnProperty checks into _.keys, speeding _.keys up by about 25%, and using it to simplify other functions: _.each, _.isEmpty, _.functions --- underscore.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/underscore.js b/underscore.js index d76efb223..e3f938ba1 100644 --- a/underscore.js +++ b/underscore.js @@ -43,11 +43,10 @@ if (obj.forEach) { obj.forEach(iterator, context); } else if (obj.length) { - for (var i=0, l = obj.length; i