tty.js 268 B

12345678910111213
  1. exports.isatty = function(){
  2. return true;
  3. };
  4. exports.getWindowSize = function(){
  5. if ('innerHeight' in global) {
  6. return [global.innerHeight, global.innerWidth];
  7. } else {
  8. // In a Web Worker, the DOM Window is not available.
  9. return [640, 480];
  10. }
  11. };