MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / getNodeConfig

Function getNodeConfig

src/nodeExecutor.ts:47–60  ·  view source on GitHub ↗
(config: unknown, textValue: string)

Source from the content-addressed store, hash-verified

45};
46
47const getNodeConfig = <T>(config: unknown, textValue: string): T | undefined => {
48 if (config !== undefined) {
49 return config as T;
50 }
51 if (!textValue) {
52 return undefined;
53 }
54
55 try {
56 return JSON.parse(textValue) as T;
57 } catch {
58 return undefined;
59 }
60};
61
62const getRowsForPackedFile = (
63 packedFile: Pick<PackedFile, "schemaFields" | "tableSchema">,

Calls

no outgoing calls

Tested by

no test coverage detected