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

prompt-question

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prompt-question - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

3

index.js

@@ -138,3 +138,4 @@ 'use strict';

if (this._choices && !this.choices.checked.length && this.default != null) {
this.choices.check(this.default);
this.choices.check(utils.decrement(this.default));
this.default = null;
}

@@ -141,0 +142,0 @@ if (this._choices && this.choices.length) {

@@ -46,2 +46,16 @@ 'use strict';

/**
* Decrement the number on each value in the given array.
*/
utils.decrement = function(val) {
val = Array.isArray(val) ? val : [val];
for (var i = 0; i < val.length; i++) {
if (typeof val[i] === 'number') {
val[i] = val[i] - 1;
}
}
return val;
};
/**
* Return true if `val` is an object

@@ -48,0 +62,0 @@ */

{
"name": "prompt-question",
"description": "Question object, used by Enquirer and prompt plugins.",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://github.com/enquirer/prompt-question",

@@ -6,0 +6,0 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

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