Skip to content

CLI tool to ask if you're sure. Will exit if you're not.

Notifications You must be signed in to change notification settings

NullVoxPopuli/node-confirm

Repository files navigation

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

About

CLI tool to ask if you're sure. Will exit if you're not.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published