(array)
| 7234 | } |
| 7235 | |
| 7236 | emitArray(array) { |
| 7237 | if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) { |
| 7238 | this.append('Array'); |
| 7239 | return; |
| 7240 | } |
| 7241 | |
| 7242 | const length = Math.min(array.length, j$.MAX_PRETTY_PRINT_ARRAY_LENGTH); |
| 7243 | this.append('[ '); |
| 7244 | |
| 7245 | for (let i = 0; i < length; i++) { |
| 7246 | if (i > 0) { |
| 7247 | this.append(', '); |
| 7248 | } |
| 7249 | this.format(array[i]); |
| 7250 | } |
| 7251 | if (array.length > length) { |
| 7252 | this.append(', ...'); |
| 7253 | } |
| 7254 | |
| 7255 | let first = array.length === 0; |
| 7256 | const wasTruncated = this.iterateObject(array, property => { |
| 7257 | if (first) { |
| 7258 | first = false; |
| 7259 | } else { |
| 7260 | this.append(', '); |
| 7261 | } |
| 7262 | |
| 7263 | this.formatProperty(array, property); |
| 7264 | }); |
| 7265 | |
| 7266 | if (wasTruncated) { |
| 7267 | this.append(', ...'); |
| 7268 | } |
| 7269 | |
| 7270 | this.append(' ]'); |
| 7271 | } |
| 7272 | |
| 7273 | emitSet(set) { |
| 7274 | if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) { |
no test coverage detected