MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / stringify

Method stringify

src/parser/aison.ts:52–65  ·  view source on GitHub ↗
(value: JsValue, _unused = null, indent: number | string = 0)

Source from the content-addressed store, hash-verified

50 }
51
52 public static stringify(value: JsValue, _unused = null, indent: number | string = 0): string {
53 let _indent: string | null = null;
54 if (typeof indent === 'number') {
55 if (indent > 0) {
56 _indent = ' '.repeat(indent);
57 }
58 } else if (indent.length > 0) {
59 _indent = indent;
60 }
61
62 const aisValue = jsToVal(value);
63
64 return this.stringifyWalk(aisValue, _indent);
65 }
66}

Callers 5

aison.tsFile · 0.80
std.tsFile · 0.80
stringifyWalkMethod · 0.80
readFunction · 0.80
gen-pkg-ts.mjsFile · 0.80

Calls 2

stringifyWalkMethod · 0.95
jsToValFunction · 0.85

Tested by

no test coverage detected