MCPcopy Create free account
hub / github.com/Marus/cortex-debug / newFunction

Function newFunction

src/docgen.ts:42–58  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

40 }
41
42 function newFunction(obj: any) {
43 const ary = [];
44 let isComplex = false;
45 for (const item of (obj.anyOf || obj.oneOf)) {
46 const tmp = getType(item);
47 if (ary.findIndex((s) => s === tmp) === -1) {
48 ary.push(getType(item));
49 }
50 if (item.itemms || item.properties || item.anyOf || item.oneOf) {
51 isComplex = true;
52 }
53 }
54 if (isComplex) {
55 return '{' + ary.join(pipe) + '}';
56 }
57 return ary.join(pipe);
58 }
59}
60
61function writeHeader(f: fs.WriteStream) {

Callers 1

getTypeFunction · 0.85

Calls 1

getTypeFunction · 0.85

Tested by

no test coverage detected