show terminal header with link to sources

This commit is contained in:
Alexander Wunschik
2022-03-19 16:48:30 +01:00
parent 354c1f9ab3
commit 2d7a1b2a36
15 changed files with 616 additions and 175 deletions

View File

@@ -0,0 +1,21 @@
export function print(...messages) {
process.stdout.write(messages.join(""));
}
export function println(...messages) {
process.stdout.write(messages.join("") + "\n");
}
export function tab(count) {
return " ".repeat(count);
}
export async function input(message = "") {
process.stdout.write(message + ' ');
return new Promise(resolve => {
process.stdin.on('data', (input) => {
resolve(input.toString().replace('\n', ''));
});
});
}