@@ -6,6 +6,7 @@ const TTY = process.binding('tty_wrap').TTY;
6
6
const isTTY = process . binding ( 'tty_wrap' ) . isTTY ;
7
7
const inherits = util . inherits ;
8
8
const errnoException = util . _errnoException ;
9
+ const readline = require ( 'readline' ) ;
9
10
10
11
11
12
exports . isatty = function ( fd ) {
@@ -90,16 +91,16 @@ WriteStream.prototype._refreshSize = function() {
90
91
91
92
// backwards-compat
92
93
WriteStream . prototype . cursorTo = function ( x , y ) {
93
- require ( ' readline' ) . cursorTo ( this , x , y ) ;
94
+ readline . cursorTo ( this , x , y ) ;
94
95
} ;
95
96
WriteStream . prototype . moveCursor = function ( dx , dy ) {
96
- require ( ' readline' ) . moveCursor ( this , dx , dy ) ;
97
+ readline . moveCursor ( this , dx , dy ) ;
97
98
} ;
98
99
WriteStream . prototype . clearLine = function ( dir ) {
99
- require ( ' readline' ) . clearLine ( this , dir ) ;
100
+ readline . clearLine ( this , dir ) ;
100
101
} ;
101
102
WriteStream . prototype . clearScreenDown = function ( ) {
102
- require ( ' readline' ) . clearScreenDown ( this ) ;
103
+ readline . clearScreenDown ( this ) ;
103
104
} ;
104
105
WriteStream . prototype . getWindowSize = function ( ) {
105
106
return [ this . columns , this . rows ] ;
0 commit comments