UNPKG

clrscr

Version:

A ridiculously simple cross-platform tool to clear terminal screen

5 lines (4 loc) 157 B
#!/usr/bin/env node const isWindows = process.platform === 'win32'; const CLEAR = isWindows ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H'; process.stdout.write(CLEAR);