MCPcopy
hub / github.com/ComposioHQ/composio / stringify

Function stringify

ts/packages/ts-builders/src/stringify.ts:13–30  ·  view source on GitHub ↗
(
  builder: BasicBuilder,
  { indentLevel = 0, newLine = 'none' }: StringifyOptions = {}
)

Source from the content-addressed store, hash-verified

11};
12
13export function stringify(
14 builder: BasicBuilder,
15 { indentLevel = 0, newLine = 'none' }: StringifyOptions = {}
16) {
17 const str = new Writer(indentLevel, undefined).write(builder).toString();
18 switch (newLine) {
19 case 'none':
20 return str;
21 case 'leading':
22 return '\n' + str;
23 case 'trailing':
24 return str + '\n';
25 case 'both':
26 return '\n' + str + '\n';
27 default:
28 assertNever(newLine, 'Unexpected value');
29 }
30}

Callers 15

Class.test.tsFile · 0.90
TupleType.test.tsFile · 0.90
ObjectType.test.tsFile · 0.90
Method.test.tsFile · 0.90
NamedType.test.tsFile · 0.90
Parameter.test.tsFile · 0.90
KeyType.test.tsFile · 0.90
ExportFrom.test.tsFile · 0.90

Calls 3

assertNeverFunction · 0.85
toStringMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…