Socket
Socket
Sign inDemoInstall

prompt

Package Overview
Dependencies
78
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.12 to 0.2.13

8

lib/prompt.js

@@ -453,4 +453,4 @@ /*

var type = (schema.properties && schema.properties[name] &&
schema.properties[name].type || '').toLowerCase().trim(),
var type = (schema.properties && schema.properties[propName] &&
schema.properties[propName].type || '').toLowerCase().trim(),
wait = type === 'array';

@@ -520,4 +520,4 @@

if (schema.properties[name]) {
var type = (schema.properties[name].type || '').toLowerCase().trim() || undefined;
if (schema.properties[propName]) {
var type = (schema.properties[propName].type || '').toLowerCase().trim() || undefined;

@@ -524,0 +524,0 @@ //

{
"name": "prompt",
"description": "A beautiful command-line prompt for node.js",
"version": "0.2.12",
"version": "0.2.13",
"author": "Nodejitsu Inc. <info@nodejitsu.com>",

@@ -6,0 +6,0 @@ "maintainers": [

@@ -238,3 +238,3 @@ # prompt [![Build Status](https://secure.travis-ci.org/flatiron/prompt.png)](http://travis-ci.org/flatiron/prompt)

type: 'string',
require: true
required: true
}, {

@@ -244,3 +244,3 @@ name: 'surname',

type: 'string',
require: true,
required: true,
message: 'Please dont use the demo credentials',

@@ -247,0 +247,0 @@ conform: function(surname) {

@@ -537,3 +537,30 @@ /*

}
}).addBatch(
}).addBatch({
"When using prompt": {
"with a type and a description property": {
"the get() method": {
topic: function () {
var that = this;
helpers.stdout.once('data', function (msg) {
that.msg = msg;
});
prompt.get({
name: 'test',
type: 'number',
description: 'Please input a number'
}, this.callback);
helpers.stdin.writeNextTick('42\n');
},
"should prompt to stdout and respond with the value": function (err, result) {
assert.isNull(err);
assert.include(result, 'test');
assert.equal(result['test'], '42');
assert.isTrue(this.msg.indexOf('Please input a number') !== -1);
}
},
}
}
})
.addBatch(
macros.shouldConfirm({

@@ -540,0 +567,0 @@ messages: ['with a string message'],

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc