MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / isEmpty

Function isEmpty

frontend/util/ijson.ts:113–127  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

111}
112
113function isEmpty(obj: any): boolean {
114 if (obj == null) {
115 return true;
116 }
117 if (isArray(obj)) {
118 return obj.length == 0;
119 }
120 if (isObject(obj)) {
121 for (const _ in obj) {
122 return false;
123 }
124 return true;
125 }
126 return false;
127}
128
129function removeFromArr(arr: any[], idx: number): any[] {
130 console.log("removefromarray", arr, idx);

Callers 1

setPathInternalFunction · 0.85

Calls 2

isArrayFunction · 0.70
isObjectFunction · 0.70

Tested by

no test coverage detected