Utility to switch terminal screens. Read question on SO
npm install --save alternate-screen
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')
Write to terminale escape sequence to switch screen to alternate.
Write to terminale escape sequence to switch screen back to main.
Clone repository and run:
node ./test.js
MIT @ Sergey Sova