Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-09-17 17:52:09 -07:00
parent 1d77dfa4b7
commit 54e7baecc3
675 changed files with 11257 additions and 8085 deletions

View File

@@ -1,22 +1,17 @@
import toObject from './toObject';
import baseToPath from './baseToPath';
import isKey from './isKey';
/**
* The base implementation of `get` without support for string paths
* and default values.
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path of the property to get.
* @param {string} [pathKey] The key representation of path.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path, pathKey) {
if (object == null) {
return;
}
if (pathKey !== undefined && pathKey in toObject(object)) {
path = [pathKey];
}
function baseGet(object, path) {
path = isKey(path, object) ? [path + ''] : baseToPath(path);
var index = 0,
length = path.length;