(object, path)
| 88 | }; |
| 89 | |
| 90 | const get = function (object, path) { |
| 91 | path = castPath(path, object); |
| 92 | let index = 0; |
| 93 | const length = path.length; |
| 94 | while (object != null && index < length) { |
| 95 | object = object[toKey(path[index++])]; |
| 96 | } |
| 97 | return index && index === length ? object : undefined; |
| 98 | }; |
| 99 | |
| 100 | export { get }; |
no test coverage detected