Bump to v4.4.0.

This commit is contained in:
John-David Dalton
2016-04-12 23:55:57 -07:00
parent 04e08670ed
commit fb1f99d9d9
415 changed files with 36968 additions and 4619 deletions

View File

@@ -1,4 +1,4 @@
# lodash.method v4.3.0
# lodash.method v4.4.0
The [lodash](https://lodash.com/) method `_.method` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var method = require('lodash.method');
```
See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.method) for more details.
See the [documentation](https://lodash.com/docs#method) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.method) for more details.

View File

@@ -1,5 +1,5 @@
/**
* lodash 4.3.0 (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>
@@ -10,6 +10,9 @@ var baseSlice = require('lodash._baseslice'),
rest = require('lodash.rest'),
stringToPath = require('lodash._stringtopath');
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
@@ -63,7 +66,7 @@ function baseGet(object, path) {
length = path.length;
while (object != null && index < length) {
object = object[path[index++]];
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
@@ -84,7 +87,7 @@ function baseInvoke(object, path, args) {
object = parent(object, path);
path = last(path);
}
var func = object == null ? object : object[path];
var func = object == null ? object : object[toKey(path)];
return func == null ? undefined : apply(func, object, args);
}
@@ -108,13 +111,16 @@ function castPath(value) {
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol') {
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return !isArray(value) &&
(isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object)));
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
/**
@@ -129,6 +135,21 @@ function parent(object, path) {
return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
}
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Gets the last element of `array`.
*
@@ -236,7 +257,7 @@ function isSymbol(value) {
* @category Util
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new function.
* @returns {Function} Returns the new invoker function.
* @example
*
* var objects = [

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.method",
"version": "4.3.0",
"version": "4.4.0",
"description": "The lodash method `_.method` exported as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -16,7 +16,7 @@
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" },
"dependencies": {
"lodash._baseslice": "~4.0.0",
"lodash._stringtopath": "~4.7.0",
"lodash._stringtopath": "~4.8.0",
"lodash.rest": "^4.0.0"
}
}