1. sure
Asks you if you are sure. If you are not, it will return an error code. Is useful in scripts where you want a confirmation before executing.
sure
Package: sure
Created by: jntn
Last modified: Mon, 27 Jun 2022 02:26:02 GMT
Version: 0.0.3
License: ISC
Downloads: 859
Repository: https://github.com/jntn/sure

Install

npm install sure
yarn add sure

sure

Asks you if you are sure. If you are not, it will return an error code. Is useful in scripts where you want a confirmation before executing.

For example if you have a destructive script in package.json (when using && the next command wont be run if current command exits with an error code):

 "scripts": {
  "clean": "sure && rm -rf dist",
}
 $ npm run clean
Are you sure? [y/n]
...

Can be invoked with your own question and allowed answer:

 $ sure --question "Type ok to continue." --yes "ok"
Type ok to continue.
...

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code