alternate-screen
v1.0.0
Published
Show alternate terminal screen
Downloads
3
Maintainers
Readme
alternate-screen
Utility to switch terminal screens. Read question on SO
Installation
npm install --save alternate-screen
Usage
Node.JS:
const { show, hide } = require('alternate-screen')
console.log('In the main screen')
show()
console.log('In alternate screen')
hide()
console.log('Again in main screen')
Babel:
import { show, hide } from 'alternate-screen'
console.log('In the main screen')
show()
console.log('In alternate screen')
hide()
console.log('Again in main screen')
API
show
and showAlternateScreen
Write to terminale escape sequence to switch screen to alternate.
hide
and hideAlternateScreen
Write to terminale escape sequence to switch screen back to main.
Example
Clone repository and run:
node ./test.js
License
MIT @ Sergey Sova