* The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value.
(object, path)
| 3073 | * @returns {*} Returns the resolved value. |
| 3074 | */ |
| 3075 | function baseGet(object, path) { |
| 3076 | path = castPath(path, object); |
| 3077 | |
| 3078 | var index = 0, |
| 3079 | length = path.length; |
| 3080 | |
| 3081 | while (object != null && index < length) { |
| 3082 | object = object[toKey(path[index++])]; |
| 3083 | } |
| 3084 | return (index && index == length) ? object : undefined; |
| 3085 | } |
| 3086 | |
| 3087 | /** |
| 3088 | * The base implementation of `getAllKeys` and `getAllKeysIn` which uses |
no test coverage detected