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

optimist 0.6.1

Light-weight option parsing with an argv hash. No optstrings attached.
Package summary
Share
4
issues
1
critical severity
vulnerability
1
1
high severity
license
1
1
moderate severity
vulnerability
1
1
low severity
license
1
2
licenses
2
MIT
1
MIT/X11
Package created
21 Dec 2010
Version published
6 Feb 2014
Maintainers
2
Total deps
3
Direct deps
2
License
MIT/X11

Issues

4

1 critical severity issue

critical
Recommendation: Upgrade to version 0.2.4 or later
via: minimist@0.0.10
Collapse
Expand

1 high severity issue

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

1 moderate severity issue

moderate
Recommendation: Upgrade to version 0.2.1 or later
via: minimist@0.0.10
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: optimist@0.6.1
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
2 Packages, Including:
minimist@0.0.10
wordwrap@0.0.3

MIT/X11

Invalid
Not OSI Approved
1 Packages, Including:
optimist@0.6.1
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

2
All Dependencies CSV
β“˜ This is a list of optimist 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
minimist0.0.106.05 kBMIT
prod
1
1
wordwrap0.0.314.19 kBMIT
prod

Visualizations

Frequently Asked Questions

What does optimist do?

Optimist is a lightweight Node.js library designed for option parsing with an argv hash. It is designed to eliminate the complexities often associated with option parsing by simplifying the process down to a simple hash, making it an excellent solution for those who seek extensive --bells and -whistlz of program usage without having to deal with cumbersome optstrings. However, it's worth noting that the package has been deprecated with the maintainers now encouraging the use of the packages such as minimist and yargs for argument parsing needs.

How do you use optimist?

To use Optimist, start by installing the Optimist module via npm (npm install optimist). Once installed, you can require it in your JavaScript file like this: var argv = require('optimist').argv;. You can then use the resulting argv object to access command line arguments using the dot notation, like argv.input. Here's an example usage:

#!/usr/bin/env node
var argv = require('optimist').argv;

if (argv.rif - 5 * argv.xup > 7.138) {
    console.log('Buy more riffiwobbles');
} else {
    console.log('Sell the xupptumblers');
}

Run this script using the command ./script.js --rif=55 --xup=9.52 and ./script.js --rif=12 --xup=8.1 to see its usage. On top of this, Optimist supports a wide variety of features including short options, booleans, non-hyphenated options, and more.

Where are the optimist docs?

Optimist's documentation, including methods, usage examples, and other additional features like aliasing, default values, required values, and displaying usage information, can be found on the project's GitHub page at http://github.com/substack/node-optimist.git. Please note that the package is in a deprecated state, it's recommended to consider options like minimist or yargs if starting a new project.