(x: JSONValue[])
| 78 | |
| 79 | class 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'; |
no test coverage detected