bun-readline
v0.1.12
Published
GNU-Readline kind library for the Bun runtime.
Downloads
3
Readme
bun-readline
GNU-Readline kind library for the Bun runtime.
Install
bun add bun-readline
Usage
import { readline } from 'bun-readline'
while (true) {
const line = readline('Say anything... ')
if (line.signal === 'CtrlC') {
console.log('CtrlC')
break
}
if (line.signal === 'CtrlD') {
console.log('CtrlD')
break
}
console.log(line.value)
}
Development
License
MIT