(o: T, path: (string | number)[])
| 315 | * @internal please do not use. |
| 316 | */ |
| 317 | export function plucker<T>(o: T, path: (string | number)[]): any { |
| 318 | const length = Array.isArray(path) ? path.length : 0; |
| 319 | for (let i = 0; i < length; i++) { |
| 320 | if (o == null) { |
| 321 | return undefined; |
| 322 | } |
| 323 | o = Object.prototype.hasOwnProperty.call(o, path[i]) ? o[path[i]] : undefined; |
| 324 | } |
| 325 | return o; |
| 326 | } |
| 327 | |
| 328 | /** |
| 329 | * @internal please do not use. |
no outgoing calls