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

inquirer

Package Overview
Dependencies
Maintainers
2
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

3

lib/prompts/input.js

@@ -44,5 +44,8 @@ 'use strict';

var message = this.getQuestion();
var transformer = this.opt.transformer;
if (this.status === 'answered') {
message += chalk.cyan(this.answer);
} else if (transformer) {
message += transformer(this.rl.line);
} else {

@@ -49,0 +52,0 @@ message += this.rl.line;

6

package.json
{
"name": "inquirer",
"version": "5.0.1",
"version": "5.1.0",
"description":

@@ -23,3 +23,3 @@ "A collection of common interactive command line user interfaces.",

"lint-staged": "^6.0.0",
"mocha": "^4.0.0",
"mocha": "^5.0.0",
"mockery": "^2.1.0",

@@ -32,3 +32,3 @@ "nsp": "^3.0.0",

"scripts": {
"test": "nyc mocha test/** -r ./test/before",
"test": "nyc mocha test/**/* -r ./test/before",
"prepublish": "nsp check",

@@ -35,0 +35,0 @@ "pretest": "eslint .",

@@ -116,2 +116,3 @@ Inquirer.js

- **filter**: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the _Answers_ hash.
- **transformer**: (Function) Receive the user input and return the transformed value to be displayed to the user. The transformation only impacts what is shown while editing. It does not impact the `answers` hash.
- **when**: (Function, Boolean) Receive the current user answers hash and should return `true` or `false` depending on whether or not this question should be asked. The value can also be a simple boolean.

@@ -122,3 +123,3 @@ - **pageSize**: (Number) Change the number of lines that will be rendered when using `list`, `rawList`, `expand` or `checkbox`.

`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronous. Either return a promise or use `this.async()` to get a callback you'll call with the final value.
`default`, `choices`(if defined as functions), `validate`, `filter` and `when` functions can be called asynchronously. Either return a promise or use `this.async()` to get a callback you'll call with the final value.

@@ -242,3 +243,3 @@ ``` javascript

Take `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.
Take `type`, `name`, `message`[, `default`, `filter`, `validate`, `transformer`] properties.

@@ -245,0 +246,0 @@ ![Input prompt](https://cdn.rawgit.com/SBoudrias/Inquirer.js/28ae8337ba51d93e359ef4f7ee24e79b69898962/assets/screenshots/input.svg)

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