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

question-cache

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

question-cache - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

13

index.js

@@ -417,2 +417,3 @@ 'use strict';

var args = [].slice.call(arguments);
var questions = this.buildQueue(queue);

@@ -427,3 +428,3 @@ var answers = this.answers;

var opts = utils.merge({}, self.options, config);
var data = utils.merge({}, self.data, opts);
var data = utils.merge({}, self.data, opts, opts.data);

@@ -494,2 +495,12 @@ var question = self.get(key);

var val = answer[key];
if (!val && (opts.required || question.required)) {
var msg = question.requiredMessage
|| opts.requiredMessage
|| '>> answer is required';
console.log(utils.log.red(msg));
self.ask.apply(self, args);
return;
}
if (question.type === 'checkbox') {

@@ -496,0 +507,0 @@ val = utils.flatten(val);

2

lib/question.js

@@ -163,3 +163,3 @@ /*!

Question.prototype.getAnswer = function(answers, data) {
return utils.get(answers, this.name) || utils.get(data, this.name);
return utils.get(data, this.name) || utils.get(answers, this.name);
};

@@ -166,0 +166,0 @@

@@ -22,2 +22,3 @@ 'use strict';

require('isobject', 'isObject');
require('log-utils', 'log');
require('mixin-deep', 'merge');

@@ -24,0 +25,0 @@ require('omit-empty');

{
"name": "question-cache",
"description": "A wrapper around inquirer that makes it easy to create and selectively reuse questions.",
"version": "0.6.0",
"version": "0.7.0",
"homepage": "https://github.com/jonschlinkert/question-cache",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Brian Woodward <brian.woodward@gmail.com> (https://github.com/doowb)",
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
],
"repository": "jonschlinkert/question-cache",

@@ -14,5 +18,3 @@ "bugs": {

"index.js",
"lib",
"LICENSE",
"README.md"
"lib"
],

@@ -37,2 +39,3 @@ "main": "index.js",

"lazy-cache": "^2.0.1",
"log-utils": "^0.2.1",
"mixin-deep": "^1.1.3",

@@ -39,0 +42,0 @@ "omit-empty": "^0.4.1",

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