MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / array

Method array

shared/rison.ts:80–98  ·  view source on GitHub ↗
(x: JSONValue[])

Source from the content-addressed store, hash-verified

78
79class Encoders {
80 static array(x: JSONValue[]) {
81 const a = ['!('];
82 let b;
83 let i;
84 const l = x.length;
85 let v;
86 for (i = 0; i < l; i += 1) {
87 v = enc(x[i]);
88 if (typeof v == 'string') {
89 if (b) {
90 a[a.length] = ',';
91 }
92 a[a.length] = v;
93 b = true;
94 }
95 }
96 a[a.length] = ')';
97 return a.join('');
98 }
99 static boolean(x: boolean) {
100 if (x) return '!t';
101 return '!f';

Callers 3

registerShortlinkToolsFunction · 0.80
registerCompileToolFunction · 0.80
objectMethod · 0.80

Calls 1

encFunction · 0.85

Tested by

no test coverage detected