mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
476 B
20 lines
476 B
10 years ago
|
var baseGet = require('./baseGet'),
|
||
|
toPath = require('./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);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module.exports = basePropertyDeep;
|