lodash-es
Version:
The modern build of lodash exported as ES modules.
20 lines (17 loc) • 468 B
JavaScript
import baseGet from './baseGet';
import toPath from './toPath';
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new function.
*/
function basePropertyDeep(path) {
var pathKey = (path + '');
path = toPath(path);
return function(object) {
return baseGet(object, path, pathKey);
};
}
export default basePropertyDeep;