@cuties/readline
Cutie extension for readline module in Node.
Last updated a year ago by guseyn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @cuties/readline 
SYNC missed versions from official npm registry.

cutie-readline

NPM Version Build Status codecov

Cutie extension for readline module in Node. It's based on the Async Tree Pattern.

Examples

You can find examples of using this library in the test directory.

Install

npm install @cuties/readline

Run test

npm test

Run build

npm run build

Usage

const {
  // Needed async objects here from the table below
} = require('@cuties/readline');

For more information about parameters in the async objects visit docs of Node for readline module.

interface

Async Object Async/sync call Parameters(default value/description) Representation result
ClosedInterface Interface.close Interface Interface
CreatedInterface readline.createInterface Interface, options Interface
InterfaceWithCloseEvent Interface.on('close', event) Interface, event(Event with definedBody()) Interface
InterfaceWithLineEvent Interface.on('line', event) Interface, event(Event with definedBody(input)) Interface
InterfaceWithPauseEvent Interface.on('pause', event) Interface, event(Event with definedBody()) Interface
InterfaceWithPrompt Interface.setPrompt prompt Interface
InterfaceWithResumeEvent Interface.on('resume', event) Interface, event(Event with definedBody()) Interface
InterfaceWithSIGCONTEvent Interface.on('SIGCONT', event) Interface, event(Event with definedBody()) Interface
InterfaceWithSIGINTEvent Interface.on('SIGINT', event) Interface, event(Event with definedBody()) Interface
InterfaceWithSIGTSTPEvent Interface.on('SIGTSTP', event) Interface, event(Event with definedBody()) Interface
PausedInterface Interface.pause Interface Interface
PromptedInterface Interface.prompt Interface[, preserveCursor] Interface
QuestionedInterface Interface.question Interface, query, event(Event with definedBody(answer)) Interface
ResumedInterface Interface.resume Interface Interface
WrittenInterface Interface.write Interface, data[, key] Interface

stream and other structures

Async Object Async/sync call Parameters(default value/description) Representation result
AnswersOfQuestionedInterface Interface.question Interface, query[, previousAnswers(is AnswersOfQuestionedInterface or string[])] string[]
StreamWithClearedLine readline.clearLine stream, dir stream
StreamWithClearedScreenDown readline.clearScreenDown stream stream
StreamWithCursorTo readline.streamWithCursorTo stream, x, y stream
StreamWithEmittedKeypressEvents readline.emitKeypressEvents stream[, interface] stream
StreamWithMovedCursor readline.moveCursor stream, dx, dy stream

Current Tags

  • 1.1.1                                ...           latest (a year ago)

3 Versions

  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |