using a cached reference to hasOwnProperty (again)

This commit is contained in:
Jeremy Ashkenas
2012-01-23 16:05:56 -05:00
parent f1ecedf64a
commit 5ed8b6e6ce

View File

@@ -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