
Product
Go Support Is Now Generally Available
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
confirmation
Advanced tools
A simple Node tool to have Browser's confirm
popup on your CLI.
yarn add confirmation
In an async
function just call await confirmation
.
if (await confirmation('Are you sure?')) {
console.log('Yay!');
} else {
console.log('Oops!');
}
await confirmation(message) : bool
Shows a message and OK
and Cancel
buttons.
Example:
const result = await confirmation('You will delete your items, are you sure?')
await confirmation(title, message) : bool
Shows a message with a title and OK
and Cancel
buttons.
Example:
const result = await confirmation('Warning', 'You will delete your items, are you sure?')
await confirmation(title, message, ok, cancel) : bool
Shows a message with a title and custom OK
and custom Cancel
buttons.
Example:
const result = await confirmation(
'Warning',
'You will delete your items, are you sure?',
'I am sure',
'No!'
)
The Y for OK and N for Cancel are the default key bindings.
When you customize your OK and Cancel buttons, the first letter will be the key binding. If you make I am Sure instead of OK, you'll need to press I to confirm.
Example:
const result = await confirmation(
'Warning',
'You will delete your items, are you sure?',
'[O] OK',
'[X] Close'
)
Keymap:
Example:
const result = await confirmation(
'Warnin\'',
'Ye will scuttle yer items, are ye sure?',
'Aye',
'No'
)
Keymap:
MIT © Fatih Kadir Akin
FAQs
A confirmation window for Node scripts.
The npm package confirmation receives a total of 264 weekly downloads. As such, confirmation popularity was classified as not popular.
We found that confirmation 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.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.