mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
using a cached reference to hasOwnProperty (again)
This commit is contained in:
@@ -26,7 +26,8 @@
|
|||||||
// Create quick reference variables for speed access to core prototypes.
|
// Create quick reference variables for speed access to core prototypes.
|
||||||
var slice = ArrayProto.slice,
|
var slice = ArrayProto.slice,
|
||||||
unshift = ArrayProto.unshift,
|
unshift = ArrayProto.unshift,
|
||||||
toString = ObjProto.toString;
|
toString = ObjProto.toString,
|
||||||
|
hasOwnProperty = ObjProto.hasOwnProperty;
|
||||||
|
|
||||||
// All **ECMAScript 5** native function implementations that we hope to use
|
// All **ECMAScript 5** native function implementations that we hope to use
|
||||||
// are declared here.
|
// are declared here.
|
||||||
@@ -839,7 +840,7 @@
|
|||||||
|
|
||||||
// Has own property?
|
// Has own property?
|
||||||
_.has = function(obj, key) {
|
_.has = function(obj, key) {
|
||||||
return ObjProto.hasOwnProperty.call(obj, key);
|
return hasOwnProperty.call(obj, key);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Utility Functions
|
// Utility Functions
|
||||||
|
|||||||
Reference in New Issue
Block a user