1 var baseToPath = require('./_baseToPath'),
2 isKey = require('./_isKey');
5 * The base implementation of `_.get` without support for default values.
8 * @param {Object} object The object to query.
9 * @param {Array|string} path The path of the property to get.
10 * @returns {*} Returns the resolved value.
12 function baseGet(object, path) {
13 path = isKey(path, object) ? [path + ''] : baseToPath(path);
18 while (object != null && index < length) {
19 object = object[path[index++]];
21 return (index && index == length) ? object : undefined;
24 module.exports = baseGet;