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

prompt-for

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prompt-for - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

4

History.md
0.5.1 - March 27, 2015
----------------------
* fix bug for required strings
0.5.0 - October 4, 2014

@@ -3,0 +7,0 @@ -----------------------

10

lib/types.js

@@ -18,3 +18,6 @@

var msg = format(schema, options);
prompt(msg, fn);
prompt(msg, function(val){
if ('' === val && schema.required) return fn();
return fn(val);
});
};

@@ -32,3 +35,6 @@

var msg = format(schema, options);
prompt.password(msg, fn);
prompt.password(msg, function(val){
if ('' === val && schema.required) return fn();
return fn(val);
});
};

@@ -35,0 +41,0 @@

@@ -5,3 +5,3 @@ {

"repository": "git://github.com/segmentio/prompt-for.git",
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

@@ -90,5 +90,5 @@

it('should wait for required values', function(done){
prompt({ number: { type: 'number', required: true }}, function(err, answers){
prompt({ string: { required: true }}, function(err, answers){
if (err) return done(err);
assert.equal(answers.number, 42);
assert.equal(answers.string, '42');
done();

@@ -95,0 +95,0 @@ });

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