UNPKG
much
Version:
latest (0.5.0)
0.5.0
0.4.1
0.4.0
0.3.0
0.2.2
Pager with depth support for JavaScript source code
github.com/eush77/much
eush77/much
much
/
lib
/
widgets
/
input.js
17 lines
(11 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
;
var
blessed =
require
(
'blessed'
);
module
.
exports
=
function
(
screen, opts
) {
var
input = blessed.
textbox
(opts); input.
key
(
'backspace'
,
function
(
) {
if
(!input.
value
) { input.
cancel
(); } });
return
input; };