1.0.0 • Published 8 years ago
alternate-screen v1.0.0
alternate-screen
Utility to switch terminal screens. Read question on SO
Installation
npm install --save alternate-screenUsage
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.jsLicense
MIT @ Sergey Sova
1.0.0
8 years ago