Gathering detailed insights and metrics for termios-fixedv12
Gathering detailed insights and metrics for termios-fixedv12
Gathering detailed insights and metrics for termios-fixedv12
Gathering detailed insights and metrics for termios-fixedv12
npm install termios-fixedv12
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
node-termios is a module for getting and setting terminal attributes.
an attr
object may contain on or more of the following boolean fields:
attr.iflag
:
IGNBRK
: ignore BREAK conditionBRKINT
: map BREAK to SIGINTIGNPAR
: ignore (discard) parity errorsPARMRK
: mark parity and framing errorsINPCK
: enable checking of parity errorsISTRIP
: strip 8th bit off charsINLCR
: map NL into CRIGNCR
: ignore CRICRNL
: map CR to NL (ala CRMOD)IXON
: enable output flow controlIXOFF
: enable input flow controlIXANY
: any char will restart after stopIMAXBEL
: ring bell on input queue fullattr.oflag
:
OPOST
: enable following output processingONLCR
: map NL to CR-NL (ala CRMOD)OCRNL
: map CR to NLONOCR
: No CR output at column 0ONLRET
: NL performs the CR functionattr.cflag
:
CSIZE
: character size maskCS5
: 5 bits (pseudo)CS6
: 6 bitsCS7
: 7 bitsCS8
: 8 bitsCSTOPB
: send 2 stop bitsCREAD
: enable receiverPARENB
: parity enablePARODD
: odd parity, else evenHUPCL
: hang up on last closeCLOCAL
: ignore modem status linesattr.lflag
:
ECHOKE
: visual erase for line killECHOE
: visually erase charsECHOK
: echo NL after line killECHO
: enable echoingECHONL
: echo NL even if ECHO is offECHOPRT
: visual erase mode for hardcopyECHOCTL
: echo control chars as ^(Char)ISIG
: enable signals INTR, QUIT, [D]SUSPICANON
: canonicalize input linesIEXTEN
: enable DISCARD and LNEXTEXTPROC
: external processingTOSTOP
: stop background jobs from outputFLUSHO
: output being flushed (state)PENDIN
: XXX retype pending input (state)NOFLSH
: don't flush after interruptXCASE
: canonical upper/lower case.setattr(fd, attr)
: Sets attributes of the terminal bound to the
file descriptor:
.getattr(fd)
: Returns an object describing the current settings
of the terminal bound to the file descriptor:
var termios = require('termios'), data = '';
console.log("Please type something:");
process.stdin.on("data", function(d) {data += d.toString()});
setTimeout(function() {
console.log("Disabling ECHO. You won't see what you type now");
termios.setattr(process.stdin.fd, {lflag: { ECHO: false }})
console.log("\nYou typed '"+data+"'");
data = "";
}, 3000);
setTimeout(function() {
console.log("Enabling ECHO.");
termios.setattr(process.stdin.fd, {lflag: { ECHO: false }})
console.log("\nYou typed '"+data+"'");
}, 6000);
No vulnerabilities found.
No security vulnerabilities found.