Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@svkeg/ask-it
Advanced tools
Wrapper around inquirer to make asking questions in Node CLIs easier.
Add to your package.json
"askIt": "git+https://github.com/lancetipton/askIt.git"
See an example here
;(() => {
const { ask, separator, models } = require('askIt')
// See src/models/models for more information
const questionModelObject = {
// Add the default input model
...models.input,
// Override with custom values
type: 'Question type',
name: 'Name of the question',
message: 'Question to ask',
default: 'Default value if user enters nothing',
}
// Pass the model directly to the ask method
// Returns a value entered by the user or the default
const askResponse = await ask({ ...questionModelObject })
// Ask a true / false question
// Returns a boolean
const confirmResponse = await ask.confirm('Ask a confirm question?')
// Ask for text input
// Returns a string of the entered text
const inputResponse = await ask.input('Ask for text input')
// Ask for a password / secret - input will be hidden
// Returns a string of the entered text
const passwordResponse = await ask.password('Ask for hidden text input')
// Ask for user to select an option from a list of options
// Returns the index of the select option within the passed in array
const listResponse = await ask.promptList([
'Option 1',
'Option 2',
'Option 3',
])
})()
function
Object
- a question model object
function
string
- The true / false question to askstring
used as the question asked to the userfunction
string
- The text input question to askfunction
string
- The text input question to askask.input
, except user input is hiddenfunction
array
- List of options to present to the userindex
of the selected item from the passed in options
function
new inquirer.Separator()
Object
FAQs
Node CLI helper for asking questions
The npm package @svkeg/ask-it receives a total of 5 weekly downloads. As such, @svkeg/ask-it popularity was classified as not popular.
We found that @svkeg/ask-it 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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.