New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

askcharacter

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
a

askcharacter

Prompt for a single character

2.0.4
latest
99

Supply Chain Security

100

Vulnerability

71

Quality

86

Maintenance

100

License

Version published
Weekly downloads
57K
79.92%
Maintainers
33
Weekly downloads
 
Created
Issues
0

askcharacter

Prompt for a single character

import askcharacter from 'askcharacter';

console.log('Please enter a character:');
const char = await askcharacter(process.stdin);
console.log('You entered the following askcharacter:', char.toString());

The stream passed to askcharacter can be any kind of Readable stream. If it is a TTY, askcharacter will temporarily remove all other 'data' and 'readable' listeners from it, and set the TTY into raw mode if it has not been in raw mode to begin with.

Why not use read instead?

Because read does not work inside a Node.js REPL.

LICENSE

Apache-2.0

FAQs

Package last updated on 10 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts