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.
Command-line Questions & Answers. Supports color formatting, lists, yes/no confirmations.
$ npm install cli-qa
var NewQA = require('cli-qa')
var QA = NewQA()
QA.ask("{white}Name:{reset}")
QA.ask({ title: "Username:", default: process.env.USER })
QA.ask({ key: "email", title: "E-Mail:", expect: { email: true } })
QA.ask({ title: "{red}Favorite foods:{reset}", list: 3 })
QA.ask({ key: "books", title: "{white}Favorite books:{reset}", list: true })
QA.ask({ title: "{yellow}Favorite {green}Fruits{reset}:", commaList: true })
QA.ask({ key: 'thatsAll', title: "{yellow}That's all, {name}? (yes/no){reset}", yesno: true })
QA.start(function (answers) {
console.log(answers)
// => {
// "name": "Azer",
// "username": "ak",
// "email": "azer@roadbeats.com",
// "foods": ["falafel", "babi guling", "kebab"],
// "favoriteBooks": ["snow", "white castle"],
// "thoughts": "let's go somewhere!",
// "thatsAll": true
// }
})
The list of available options for each question:
The key that will be used in the answers object. If not specified, it'll be auto-generated
Title of the question. styling accepted.
If a numeric value is passed, user will be prompted to enter a list with expected number of lines. If true passed, the list input won't be limited.
Specify "true" if a comma-separated list is expected as an answer
Yes/no question? true/false
Default value if answer is empty.
Specify requirements for validating the user input.
Async validation function. See tests for example.
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 cli-qa receives a total of 0 weekly downloads. As such, cli-qa popularity was classified as not popular.
We found that cli-qa 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.