UNPKG

lodash-compat

Version:

The compatibility build of lodash modular utilities.

20 lines (17 loc) 476 B
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;