(val)
| 105 | } |
| 106 | |
| 107 | function represent(val) { |
| 108 | if (typeof val == "boolean") return String(val) |
| 109 | if (typeof val == "number") return String(val) |
| 110 | if (typeof val == "string") return JSON.stringify(val) |
| 111 | if (val == null) return String(val) |
| 112 | if (Array.isArray(val)) return representArray(val) |
| 113 | else return representObj(val) |
| 114 | } |
| 115 | |
| 116 | function representArray(val) { |
| 117 | let out = "[" |
no test coverage detected