* 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)
| 27964 | * @returns {*} Returns the resolved value. |
| 27965 | */ |
| 27966 | function baseGet(object, path) { |
| 27967 | path = castPath(path, object); |
| 27968 | |
| 27969 | var index = 0, |
| 27970 | length = path.length; |
| 27971 | |
| 27972 | while (object != null && index < length) { |
| 27973 | object = object[toKey(path[index++])]; |
| 27974 | } |
| 27975 | return index && index == length ? object : undefined; |
| 27976 | } |
| 27977 | |
| 27978 | module.exports = baseGet; |
| 27979 |
no test coverage detected