MCPcopy Index your code
hub / github.com/nodejs/node / clear

Function clear

lib/internal/console/constructor.js:490–503  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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') {

Callers 1

cancelListenerHandlerFunction · 0.50

Calls 3

cursorToFunction · 0.85
clearScreenDownFunction · 0.85
requireFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…