mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
20 lines
492 B
JavaScript
20 lines
492 B
JavaScript
define(['./baseGet', './toPath'], function(baseGet, 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);
|
|
};
|
|
}
|
|
|
|
return basePropertyDeep;
|
|
});
|