()
| 488 | |
| 489 | // Defined by: https://console.spec.whatwg.org/#clear |
| 490 | clear() { |
| 491 | // It only makes sense to clear if _stdout is a TTY. |
| 492 | // Otherwise, do nothing. |
| 493 | if (this._stdout.isTTY && process.env.TERM !== 'dumb') { |
| 494 | // The require is here intentionally to avoid readline being |
| 495 | // required too early when console is first loaded. |
| 496 | const { |
| 497 | cursorTo, |
| 498 | clearScreenDown, |
| 499 | } = require('internal/readline/callbacks'); |
| 500 | cursorTo(this._stdout, 0, 0); |
| 501 | clearScreenDown(this._stdout); |
| 502 | } |
| 503 | }, |
| 504 | |
| 505 | // Defined by: https://console.spec.whatwg.org/#count |
| 506 | count(label = 'default') { |
no test coverage detected
searching dependent graphs…