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

prompt-for

Package Overview
Dependencies
Maintainers
1
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.2.0 to 0.3.0

5

History.md
0.3.0 - April 29, 2014
----------------------
* fix `pad` option
* add `hint` to schema for custom hints
0.2.0 - April 24, 2014

@@ -3,0 +8,0 @@ ----------------------

9

lib/index.js

@@ -95,6 +95,11 @@

obj.required = !! obj.required;
obj.label = obj.label || key;
if (options.pad) obj.label = pad(obj.label, width);
if ('boolean' == obj.type) obj.default = obj.default || false;
if ('date' == obj.type) obj.default = obj.default || 'now';
if (obj.label) {
if (options.pad) obj.label = ' ' + obj.label;
} else {
obj.label = key;
if (options.pad) obj.label = pad(obj.label, width);
}
});

@@ -101,0 +106,0 @@

@@ -19,3 +19,3 @@

prompt(msg, fn);
}
};

@@ -33,3 +33,3 @@ /**

prompt.password(msg, fn);
}
};

@@ -51,3 +51,3 @@ /**

});
}
};

@@ -68,3 +68,3 @@ /**

});
}
};

@@ -86,3 +86,3 @@ /**

});
}
};

@@ -100,3 +100,5 @@ /**

var label = color in colors ? chalk[color](schema.label) : schema.label;
return fmt('%s%s %s ', label, sep, hint(schema));
var help = hint(schema);
var h = help ? chalk.gray(help) + ' ' : '';
return fmt('%s%s %s', label, sep, h);
}

@@ -112,2 +114,3 @@

function hint(schema){
if (schema.hint) return schema.hint;
var def = schema.default;

@@ -114,0 +117,0 @@ switch (schema.type) {

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

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

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

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