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

Function checkStringMap

src/Support.ts:16–21  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

14export type StringMap = { [name: string]: any };
15
16export function checkStringMap(x: any): StringMap {
17 if (typeof x !== "object") {
18 return panic(`Value must be an object, but is ${x}`);
19 }
20 return x;
21}
22
23export function checkArray(x: any): any[] {
24 if (!Array.isArray(x)) {

Callers 9

urlsFromURLGrammarFunction · 0.90
lookupDefinitionFunction · 0.90
lookupPropertyFunction · 0.90
indexArrayFunction · 0.90
schemaToTypeFunction · 0.90
lookupRefFunction · 0.90
makeClassFunction · 0.90
fromTypeNameFunction · 0.90
convertOneOrAnyOfFunction · 0.90

Calls 1

panicFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…