diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2016-05-27 14:07:59 -0700 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-05-28 10:42:48 -0400 |
commit | bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400 (patch) | |
tree | aab54a7bbc42e1477a8a2b175dfc9f9eb36ca9e2 /deps/npm/node_modules/lodash.keys/index.js | |
parent | 16f98e589c69ffe6283aa11493fd417368708557 (diff) | |
download | android-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.tar.gz android-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.tar.bz2 android-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.zip |
deps: upgrade npm to 3.9.3
Contains the following npm releases:
- v3.9.0: https://github.com/npm/npm/releases/tag/v3.9.0
- v3.9.1: https://github.com/npm/npm/releases/tag/v3.9.1
- v3.9.2: https://github.com/npm/npm/releases/tag/v3.9.2
- v3.9.3: https://github.com/npm/npm/releases/tag/v3.9.3
PR-URL: https://github.com/nodejs/node/pull/7030
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/node_modules/lodash.keys/index.js')
-rw-r--r-- | deps/npm/node_modules/lodash.keys/index.js | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/deps/npm/node_modules/lodash.keys/index.js b/deps/npm/node_modules/lodash.keys/index.js index 5861b0ffe3..39530dfc6f 100644 --- a/deps/npm/node_modules/lodash.keys/index.js +++ b/deps/npm/node_modules/lodash.keys/index.js @@ -1,5 +1,5 @@ /** - * lodash 4.0.6 (Custom Build) <https://lodash.com/> + * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> @@ -38,20 +38,6 @@ function baseTimes(n, iteratee) { return result; } -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -59,7 +45,8 @@ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; /** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; @@ -104,7 +91,7 @@ function baseKeys(object) { * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -154,6 +141,21 @@ function indexKeys(object) { } /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** * Checks if `value` is likely a prototype object. * * @private @@ -335,8 +337,9 @@ function isLength(value) { } /** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ |