blessed-widget-manager
A centralized management module for blessed widgets.
Install
$ npm i blessed-widget-manager
# OR
$ yarn add blessed-widget-manager
Example
const blessed = // usable// const contrib = require('blessed-contrib') const WidgetManager = const wm = // Shorthands// const wm = new (require('blessed-widget-manager'))() // Register a customized methodwmproperty const screen = blessed // Register a widgetwmwmwm // Refer to a registered widgetwmwidgetbox1 // NG// wm.widget.box1.spliceLine(0, 'splice text')// wm.widget.box2.spliceLine(0, 'splice text')// ... // Apply a customized methodwmproperty // OKwmwidgetbox1 // NG// wm.widget.box2.spliceLine(0, 'splice text')// ... // Executing a method of a registered widgetwm // equal to the below// wm.widget.box2.hide()// wm.widget.box3.hide() screen;