mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
define(['../internal/isLength', '../lang/isNative', '../lang/isObject', '../internal/shimKeys'], function(isLength, isNative, isObject, shimKeys) {
|
||||
define(['../internal/isArrayLike', '../lang/isNative', '../lang/isObject', '../internal/shimKeys'], function(isArrayLike, isNative, isObject, shimKeys) {
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
|
||||
@@ -31,12 +31,9 @@ define(['../internal/isLength', '../lang/isNative', '../lang/isObject', '../inte
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
var keys = !nativeKeys ? shimKeys : function(object) {
|
||||
if (object) {
|
||||
var Ctor = object.constructor,
|
||||
length = object.length;
|
||||
}
|
||||
var Ctor = object != null && object.constructor;
|
||||
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
|
||||
(typeof object != 'function' && isLength(length))) {
|
||||
(typeof object != 'function' && isArrayLike(object))) {
|
||||
return shimKeys(object);
|
||||
}
|
||||
return isObject(object) ? nativeKeys(object) : [];
|
||||
|
||||
Reference in New Issue
Block a user