npm.io
1.3.1 • Published 3 months ago

bare-readline

Licence
Apache-2.0
Version
1.3.1
Deps
2
Size
20 kB
Vulns
0
Weekly
0
Stars
4

bare-readline

Line editing for interactive CLIs with command history.

npm i bare-readline

Usage

const readline = require('bare-readline')

const rl = readline.createInterface({
  input: stream,
  output: stream
})

rl.on('data', (line) => {
  console.log(line)
  rl.prompt()
}).prompt()

License

Apache-2.0