Skip to content

Commit e5dcad0

Browse files
author
Vitaliy Stoliarov
committed
add 'readline' to setup module
1 parent cede1bf commit e5dcad0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/util/setup.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const dotenv = require('dotenv')
4+
const Readline = require('readline-promise').default
45
const argsFromEnv = require('./args_from_env')
56
const D = require('./debug').get()
67
const debug = D('>')
@@ -12,5 +13,12 @@ module.exports = {
1213
get args () {
1314
return argsFromEnv()
1415
},
15-
debug
16+
debug,
17+
get readline () {
18+
return Readline.createInterface({
19+
input: process.stdin,
20+
output: process.stdout,
21+
terminal: false
22+
})
23+
}
1624
}

0 commit comments

Comments
 (0)