Skip to content

Instantly share code, notes, and snippets.

View Rettend's full-sized avatar
🚩
거인의 어깨에 올라서라

Hegyi Áron Ferenc Rettend

🚩
거인의 어깨에 올라서라
View GitHub Profile
@Rettend
Rettend / Chainable Console
Last active July 25, 2024 15:24
Allows chaining console logs to print them to the same line
import process from 'node:process'
class ChainableConsole extends console.Console {
#chain: this
#isChaining: boolean = false
#isFirstInChain: boolean = true
constructor(stdout: NodeJS.WriteStream, stderr: NodeJS.WriteStream, ignoreErrors?: boolean) {
super(stdout, stderr, ignoreErrors)
this.#chain = this.createChain()