1 | ;
|
2 |
|
3 | var isValue = require("./object/is-value");
|
4 |
|
5 | var slice = Array.prototype.slice;
|
6 |
|
7 | // eslint-disable-next-line no-unused-vars
|
8 | module.exports = function (value, propertyName1 /*, …propertyNamen*/) {
|
9 | var propertyNames = slice.call(arguments, 1), index = 0, length = propertyNames.length;
|
10 | while (isValue(value) && index < length) value = value[propertyNames[index++]];
|
11 | return index === length ? value : undefined;
|
12 | };
|