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 0.5.1 to 0.5.2

13

index.js
'use strict';
var debug = require('debug')('prompt-question');
var koalas = require('koalas');
var Choices = require('prompt-choices');

@@ -37,2 +38,3 @@ var utils = require('./lib/utils');

this.type = 'input';
utils.define(this, 'Choices', Choices);

@@ -103,3 +105,8 @@ utils.define(this, 'isQuestion', true);

* ```js
* var question = new Question({name: 'first', message: 'First name'?, default: 'Bob'});
* var question = new Question({
* name: 'first',
* message: 'First name'?,
* default: 'Bob'
* });
*
* console.log(question.getAnswer());

@@ -121,3 +128,3 @@ * //=> 'Bob'

Question.prototype.getAnswer = function(val) {
return (val != null && !!String(val)) ? val : (this.default || '');
return koalas(val, this.default);
};

@@ -165,3 +172,3 @@

get: function() {
return this.default != null && !!String(this.default);
return this.default != null;
}

@@ -168,0 +175,0 @@ });

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

@@ -29,4 +29,5 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"kind-of": "^3.2.0",
"koalas": "^1.0.2",
"lazy-cache": "^2.0.2",
"prompt-choices": "^0.5.1"
"prompt-choices": "^0.5.2"
},

@@ -33,0 +34,0 @@ "devDependencies": {

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