MCPcopy Index your code
hub / github.com/glideapps/quicktype / checkStringArray

Function checkStringArray

src/JSONSchemaInput.ts:31–41  ·  view source on GitHub ↗
(arr: any)

Source from the content-addressed store, hash-verified

29type Ref = List<PathElement>;
30
31function checkStringArray(arr: any): string[] {
32 if (!Array.isArray(arr)) {
33 return panic(`Expected a string array, but got ${arr}`);
34 }
35 for (const e of arr) {
36 if (typeof e !== "string") {
37 return panic(`Expected string, but got ${e}`);
38 }
39 }
40 return arr;
41}
42
43function parseRef(ref: any): [Ref, string] {
44 if (typeof ref !== "string") {

Callers 2

fromTypeNameFunction · 0.85
convertToTypeFunction · 0.85

Calls 1

panicFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…