1.1.1 • Published 3 years ago

readline-char v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

readline-char

$ npm install readline-char

Usage

const Rlc = require("readline-char");

//create an instance
let input = new Rlc();

//add an listener
input.bind((key) => {console.log(key)});

//add an cleanup listener (on ctrl+c)
input.bindCleanup(() => {
    //cleanup code
})

//start listening for events
input.init();

//block all listeners
input.block();

//unblock all listeners
input.unblock();

//register a handler which is not effected by blocking
input.bindUnblocked((key) => {console.log(key)});
1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago