MCPcopy
hub / github.com/chartjs/Chart.js / subGetTarget

Function subGetTarget

src/helpers/helpers.config.ts:373–388  ·  view source on GitHub ↗
(
  resolver: ResolverCache,
  prop: string,
  value: unknown
)

Source from the content-addressed store, hash-verified

371}
372
373function subGetTarget(
374 resolver: ResolverCache,
375 prop: string,
376 value: unknown
377) {
378 const parent = resolver._getTarget();
379 if (!(prop in parent)) {
380 parent[prop] = {};
381 }
382 const target = parent[prop];
383 if (isArray(target) && isObject(value)) {
384 // For array of objects, the object is used to store updated values
385 return value;
386 }
387 return target || {};
388}
389
390function _resolveWithPrefixes(
391 prop: string,

Callers 1

createSubResolverFunction · 0.85

Calls 3

isArrayFunction · 0.85
isObjectFunction · 0.85
_getTargetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…