mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
define(['../internal/getNative', '../internal/isArrayLike', '../lang/isObject', '../internal/shimKeys'], function(getNative, isArrayLike, isObject, shimKeys) {
|
||||
|
||||
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
||||
var undefined;
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeKeys = getNative(Object, 'keys');
|
||||
|
||||
@@ -7,7 +10,7 @@ define(['../internal/getNative', '../internal/isArrayLike', '../lang/isObject',
|
||||
* Creates an array of the own enumerable property names of `object`.
|
||||
*
|
||||
* **Note:** Non-object values are coerced to objects. See the
|
||||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
|
||||
* [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
|
||||
* for more details.
|
||||
*
|
||||
* @static
|
||||
@@ -31,7 +34,7 @@ define(['../internal/getNative', '../internal/isArrayLike', '../lang/isObject',
|
||||
* // => ['0', '1']
|
||||
*/
|
||||
var keys = !nativeKeys ? shimKeys : function(object) {
|
||||
var Ctor = object == null ? null : object.constructor;
|
||||
var Ctor = object == null ? undefined : object.constructor;
|
||||
if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
|
||||
(typeof object != 'function' && isArrayLike(object))) {
|
||||
return shimKeys(object);
|
||||
|
||||
Reference in New Issue
Block a user