Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 377 Bytes

event_resize.md

File metadata and controls

15 lines (12 loc) · 377 Bytes

The 'resize' event is emitted whenever either of the writeStream.columns or writeStream.rows properties have changed. No arguments are passed to the listener callback when called.

process.stdout.on('resize', () => {
  console.log('screen size has changed!');
  console.log(`${process.stdout.columns}x${process.stdout.rows}`);
});