MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / checkPath

Function checkPath

frontend/util/ijson.ts:85–95  ·  view source on GitHub ↗
(path: PathType)

Source from the content-addressed store, hash-verified

83}
84
85function checkPath(path: PathType): boolean {
86 if (!isArray(path)) {
87 return false;
88 }
89 for (const pathPart of path) {
90 if (typeof pathPart !== "string" && typeof pathPart !== "number") {
91 return false;
92 }
93 }
94 return true;
95}
96
97function setPath(obj: any, path: PathType, value: any, opts: SetPathOpts) {
98 if (opts == null) {

Callers 2

setPathFunction · 0.85
applyCommandFunction · 0.85

Calls 1

isArrayFunction · 0.70

Tested by

no test coverage detected