diff options
Diffstat (limited to 'deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js')
-rwxr-xr-x | deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js new file mode 100755 index 0000000000..6ac21ffa99 --- /dev/null +++ b/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node + +/** + * Like GNU ncurses "clear" command. + * https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c + */ + +process.title = 'clear' + +function lf () { return '\n' } + +require('../../')(process.stdout) + .write(Array.apply(null, Array(process.stdout.getWindowSize()[1])).map(lf).join('')) + .eraseData(2) + .goto(1, 1) |