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

Function _resolveWithPrefixes

src/helpers/helpers.config.ts:390–405  ·  view source on GitHub ↗
(
  prop: string,
  prefixes: string[],
  scopes: AnyObject[],
  proxy: ResolverProxy
)

Source from the content-addressed store, hash-verified

388}
389
390function _resolveWithPrefixes(
391 prop: string,
392 prefixes: string[],
393 scopes: AnyObject[],
394 proxy: ResolverProxy
395) {
396 let value: unknown;
397 for (const prefix of prefixes) {
398 value = _resolve(readKey(prefix, prop), scopes);
399 if (typeof value !== 'undefined') {
400 return needsSubResolver(prop, value)
401 ? createSubResolver(scopes, proxy, prop, value)
402 : value;
403 }
404 }
405}
406
407function _resolve(key: string, scopes: AnyObject[]) {
408 for (const scope of scopes) {

Callers 1

getFunction · 0.85

Calls 4

_resolveFunction · 0.85
readKeyFunction · 0.85
needsSubResolverFunction · 0.85
createSubResolverFunction · 0.85

Tested by

no test coverage detected