MCPcopy Create free account
hub / github.com/activejs/activejs / plucker

Function plucker

packages/core/src/utils/funcs.ts:317–326  ·  view source on GitHub ↗
(o: T, path: (string | number)[])

Source from the content-addressed store, hash-verified

315 * @internal please do not use.
316 */
317export 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.

Callers 5

valueMethod · 0.90
asObservableMethod · 0.90
extras.spec.tsFile · 0.90
makeCaseFunction · 0.90
selection.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by 1

makeCaseFunction · 0.72