Readline
suggest changeSyntax
require('readline') returns the module. createInterface returns the object that reads lines. close, pause, prompt, question, resume, setPrompt, and write are methods on that interface, not on the module itself.
- const readline = require('readline')
- const rl = readline.createInterface(options)
- rl.close()
- rl.pause()
- rl.prompt([preserveCursor])
- rl.question(query, callback)
- rl.resume()
- rl.setPrompt(prompt)
- rl.write(data[, key])
- readline.clearLine(stream, dir)
- readline.clearScreenDown(stream)
- readline.cursorTo(stream, x, y)
- readline.emitKeypressEvents(stream[, interface])
- readline.moveCursor(stream, dx, dy)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents