node-confirm
v1.0.2
Published
CLI tool to confirm if you are sure. Will exit if you are not.
Downloads
115
Maintainers
Readme
node-confirm
A CLI tool to confirm if you are sure. Will exit if you are not.
Usage
import { confirm } from "node-confirm";
let toDelete = getFiles();
console.log('Will delete: ', toDelete);
await confirm();
// execution stops if the user answers "no" or "n"
Use old software? cjs support is included:
const { confirm } = require("node-confirm");
async function main() {
let toDelete = getFiles();
console.log('Will delete: ', toDelete);
await confirm();
// execution stops if the user answers "no" or "n"
}
main();
Install
npm add node-confirm