Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

press-any-key

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

press-any-key - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

index.d.ts

8

index.js

@@ -1,2 +0,2 @@

const sll = require("single-line-log").stdout;
const sll = require("log-update");
const DEFAULT_MESSAGE = "Press any key to continue..."

@@ -10,4 +10,5 @@

const preverseLog = options.preverseLog || false;
const hideMessage = options.hideMessage || false;
if (mssg) {
if (mssg && !hideMessage) {
sll(mssg);

@@ -23,4 +24,5 @@ }

if (mssg && !preverseLog) {
sll("");
sll.clear();
} else {
sll.done();
process.stdout.write("\n")

@@ -27,0 +29,0 @@ }

{
"name": "press-any-key",
"version": "0.1.1",
"version": "1.0.0",
"description": "Press any key to continue...",

@@ -9,13 +9,17 @@ "main": "index.js",

"dependencies": {
"single-line-log": "^1.1.2"
"log-update": "4.0.0"
},
"bin": {
"press-any-key": "main.js"
"bin": "bin/cli.js",
"files": [
"index.js",
"index.d.ts"
],
"devDependencies": {
"jest": "^29.7.0",
"jest-sinon": "^1.1.0",
"sinon": "^17.0.1",
"strip-ansi": "^6.0.1"
},
"directories": {
"example": "examples"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest"
},

@@ -35,4 +39,3 @@ "repository": {

},
"homepage": "https://github.com/morulus/press-any-key#readme",
"bin": "bin/cli.js"
"homepage": "https://github.com/morulus/press-any-key#readme"
}
press-any-key
==
An utility to launch the simplest confirmation dialog.
A utility to launch the simplest confirmation dialog.

@@ -43,2 +43,3 @@ ```

`--preserve-log` Do not clean the message, after resolve
`--hide-message` Do not show the massage

@@ -87,3 +88,3 @@ ## How to route

The message is a string that will be displayed in standard output, before it starts to listen for key pressing. Pass `null` if you'd like to use default message.
The message is a string that will be displayed in the standard output before it starts to listen for key presses. Pass null if you'd like to use the default message.

@@ -94,4 +95,5 @@ **Options:**

- **`preverseLog`** Preserve the message in the log
- **`hideMessage`** Do not show the message
By the default when user presses CTRL+C the function will exit the process. But you able to change the standart behavior of CTRL+C by passing option `ctrlC` with the value `"reject"`. In this case, pressing CTRL+C wont exit the process, but do reject the promise.
By default, when the user presses CTRL+C, the function will exit the process. However, you can change the standard behavior of CTRL+C by passing the option ctrlC with the value "reject". In this case, pressing CTRL+C will not exit the process but will instead reject the promise.

@@ -98,0 +100,0 @@ ```js

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc