// Internal function to obtain a nested property in `obj` along `path`.
function deepGet(obj, path) {
varlength= path.length;
for (vari=0; i < length; i++) {
if (obj == null) returnvoid0;
obj = obj[path[i]];
}
return length ? obj : void0;
}
module.exports = deepGet;