Commit d3a17654 authored by Daniel Verejan's avatar Daniel Verejan Committed by Dan Abramov
Browse files

Update the string that clears the console. (#2071)

* Update the string that clears the console.

#1914
I've tested it with Windows 10 and 7, node versions from ~5.0.0 up to 7.7.0.
Didn't managed to test it on 8 but it should be fine.

* Update windows string

Add windows specific string for clearing the console.
parent e3e8cdd6
Showing with 1 addition and 3 deletions
+1 -3
......@@ -8,9 +8,7 @@
'use strict';
function clearConsole() {
process.stdout.write(
process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H'
);
process.stdout.write(process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
}
module.exports = clearConsole;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment