1.0.2 • Published 1 year ago

node-confirm v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago