lodash.keys
Advanced tools
Comparing version 3.0.6 to 3.0.7
48
index.js
/** | ||
* lodash 3.0.6 (Custom Build) <https://lodash.com/> | ||
* lodash 3.0.7 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
@@ -42,2 +42,3 @@ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
var Ctor = function() { this.x = x; }, | ||
args = arguments, | ||
object = { '0': x, 'length': x }, | ||
@@ -62,3 +63,3 @@ props = []; | ||
try { | ||
support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1); | ||
support.nonEnumArgs = !propertyIsEnumerable.call(args, 1); | ||
} catch(e) { | ||
@@ -70,2 +71,38 @@ support.nonEnumArgs = true; | ||
/** | ||
* The base implementation of `_.property` without support for deep paths. | ||
* | ||
* @private | ||
* @param {string} key The key of the property to get. | ||
* @returns {Function} Returns the new function. | ||
*/ | ||
function baseProperty(key) { | ||
return function(object) { | ||
return object == null ? undefined : object[key]; | ||
}; | ||
} | ||
/** | ||
* Gets the "length" property value of `object`. | ||
* | ||
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) | ||
* that affects Safari on at least iOS 8.1-8.3 ARM64. | ||
* | ||
* @private | ||
* @param {Object} object The object to query. | ||
* @returns {*} Returns the "length" value. | ||
*/ | ||
var getLength = baseProperty('length'); | ||
/** | ||
* Checks if `value` is array-like. | ||
* | ||
* @private | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is array-like, else `false`. | ||
*/ | ||
function isArrayLike(value) { | ||
return value != null && isLength(getLength(value)); | ||
} | ||
/** | ||
* Checks if `value` is a valid array-like index. | ||
@@ -180,8 +217,5 @@ * | ||
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); | ||
@@ -188,0 +222,0 @@ } |
{ | ||
"name": "lodash.keys", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "The modern build of lodash’s `_.keys` as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.keys v3.0.6 | ||
# lodash.keys v3.0.7 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.keys` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.0.6-npm-packages/lodash.keys) for more details. | ||
See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/3.0.7-npm-packages/lodash.keys) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10414
249