Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
read-cli-input
Advanced tools
Read user input from CLI for specified amount of lines.
$ npm install read-cli-input
var read = require('read-cli-input')
console.log("What are your most favorite 3 food ?");
read(3, function (input) {
console.log('Answer was: ', input.join(', '));
// => Answer was Falafel, ramen, babi guling
})
By default, it reads from process.stdin
. You can specify custom stdin, and a function to generate a prefix for multi-line inputs.
read({ stdin: process.stdin, lines: 3, prefix: prefix }, console.log);
function prefix (line) {
process.stdout.write(line + 1 + '.'); // It'll output "1." "2." "3." ...
}
If you'll read just one line from process.stdin, you can just pass a callback:
read(console.log);
FAQs
This package name is not currently in use, but was formerly occupied by a popular package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.
The npm package read-cli-input receives a total of 1 weekly downloads. As such, read-cli-input popularity was classified as not popular.
We found that read-cli-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.