From 5ed8b6e6ce0d0d724ce3fc8fd5a516fd1e535970 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 23 Jan 2012 16:05:56 -0500 Subject: [PATCH] using a cached reference to hasOwnProperty (again) --- underscore.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/underscore.js b/underscore.js index b787a6648..debc3481d 100644 --- a/underscore.js +++ b/underscore.js @@ -26,7 +26,8 @@ // Create quick reference variables for speed access to core prototypes. var slice = ArrayProto.slice, unshift = ArrayProto.unshift, - toString = ObjProto.toString; + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. @@ -839,7 +840,7 @@ // Has own property? _.has = function(obj, key) { - return ObjProto.hasOwnProperty.call(obj, key); + return hasOwnProperty.call(obj, key); }; // Utility Functions