Package Exports
- cli-resize
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cli-resize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cli-resize
Listen for the terminal resize event in a friendly way.
☁️ Installation
$ npm i --save cli-resize
📋 Example
const cliResize = require("cli-resize");
// Listen for resize
cliResize(size => {
console.log(size);
});
console.log("Resize the terminal.");
// A hack to keep the process opened for 10sec
setTimeout(function() {
console.log("Test ended.");
}, 10000);
📝 Documentation
CliResize(fn)
cliResize Add a new resize event listener.
Params
- Function
fn
: The callback function which is called when the terminal is resized.
😋 How to contribute
Have an idea? Found a bug? See how to contribute.