MCPcopy Create free account
hub / github.com/chartjs/Chart.js / assertPath

Function assertPath

src/core/core.defaults.ts:42–47  ·  view source on GitHub ↗

* Checks every key of a path before anything is created, so that a rejected * path leaves no empty scope behind.

(node: any, keys: string[], path: string)

Source from the content-addressed store, hash-verified

40 * path leaves no empty scope behind.
41 */
42function assertPath(node: any, keys: string[], path: string) {
43 for (const key of keys) {
44 assertOwnOrNew(node, key, path);
45 node = node && node[key];
46 }
47}
48
49const splitScope = (scope: string): string[] => (scope ? scope.split('.') : []);
50

Callers 2

getScopeFunction · 0.85
routeMethod · 0.85

Calls 1

assertOwnOrNewFunction · 0.85

Tested by

no test coverage detected