Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 19, 2024 via pnpm

prompt 1.3.0

A beautiful command-line prompt for node.js
Package summary
Share
4
issues
1
critical severity
license
1
1
high severity
license
1
1
moderate severity
meta
1
1
low severity
license
1
4
licenses
10
MIT
2
ISC
1
N/A
1
Apache 2.0
Package created
18 Mar 2011
Version published
11 Apr 2022
Maintainers
5
Total deps
14
Direct deps
5
License
MIT

Issues

4

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: winston@2.4.7
Collapse
Expand

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: revalidator@0.1.8
Collapse
Expand

1 moderate severity issue

moderate
via: winston@2.4.7
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: revalidator@0.1.8
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
@colors/colors@1.5.0
async@2.6.4
async@3.2.3
colors@1.0.3
eyes@0.1.8
isstream@0.1.2
lodash@4.17.21
prompt@1.3.0
stack-trace@0.0.10
winston@2.4.7

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
mute-stream@0.0.8
read@1.0.7

N/A

N/A
1 Packages, Including:
cycle@1.0.3

Apache 2.0

Invalid
Not OSI Approved
1 Packages, Including:
revalidator@0.1.8
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of prompt 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@colors/colors1.5.010.89 kBMIT
prod
async3.2.3151.16 kBMIT
prod
read1.0.72.61 kBISC
prod
revalidator0.1.814.11 kBApache 2.0
prod
1
1
winston2.4.740.46 kBMIT
prod
1
1

Visualizations

Frequently Asked Questions

What does prompt do?

The "prompt" package is a beautifully crafted, user-friendly command-line prompt for node.js. Its primary function is to solicit user input from the command line. It's equipped with robust features like input validation, default values, and password hiding, ensuring a secure and hassle-free user interaction.

How do you use prompt?

The usage of "prompt" is straightforward primarily because of its core methods prompt.get() and prompt.addProperties(). Here's an example of its usage:

  var prompt = require('prompt');

  prompt.start();

  prompt.get(['username', 'email'], function (err, result) {
    console.log('Command-line input received:');
    console.log('  username: ' + result.username);
    console.log('  email: ' + result.email);
  });

The above code initiates the prompt process, queries the user for their 'username' and 'email', then logs this information to the console.

For commanding complex property validation, use the "schema" object. For instance:

  var schema = {
    properties: {
      name: {
        pattern: /^[a-zA-Z\s\-]+$/,
        message: 'Name must be only letters, spaces, or dashes',
        required: true
      },
      password: {
        hidden: true
      }
    }
  };

  prompt.start();

  prompt.get(schema, function (err, result) {
    console.log('Command-line input received:');
    console.log('  name: ' + result.name);
    console.log('  password: ' + result.password);
  });

This example similarly initiates the prompt, asks the user for their 'name' and 'password' (which remains unseen), then logs the user inputs. The 'name' input is limited to letters, spaces, or dashes only. If the user enters anything else, the prompt property message will alert them, and reprompt the query.

Where are the prompt docs?

The comprehensive documentation for "prompt" can be found inside the GitHub repository - git@github.com:flatiron/prompt.git. This includes numerous examples, detailed properties for validation and prompting, customization instructions, and more. It serves as a great resource for developers aiming to optimally utilize the "prompt" package.