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 13, 2024 via pnpm

dashdash 1.14.1

A light, featureful and explicit option parsing library.
Package summary
Share
0
issues
1
license
2
MIT
Package created
28 Feb 2013
Version published
22 Nov 2016
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

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:
assert-plus@1.0.0
dashdash@1.14.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

1
All Dependencies CSV
β“˜ This is a list of dashdash 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
assert-plus1.0.03.85 kBMIT
prod

Visualizations

Frequently Asked Questions

What does dashdash do?

Dashdash is a lightweight, featureful, and explicit option-parsing library for Node.js. It's designed to tackle shortcomings of other popular option parsing libraries, providing precise control over command line arguments interpretation. Dashdash supports types for options, auto-generated help, custom option types, and bash completion.

How do you use dashdash?

Dashdash can be used by first installing it via npm. The command for this is npm install dashdash. Once installed, you can use it in your JavaScript files by requiring the module and defining the options for your CLI. Here's a short example of usage:

var dashdash = require('dashdash');

var options = [
    {
        names: ['help', 'h'],
        type: 'bool',
        help: 'Print this help and exit.'
    }
];

var opts = dashdash.parse({options: options});

console.log("opts:", opts);
console.log("args:", opts._args);

Of course, you can have more complex options and command line interfaces using dashdash. In your application, opts will contain parsed options and _args will contain arguments after the options. This way, you can handle the logic of options and arguments in your application.

Where are the dashdash docs?

The documentation for dashdash can be found directly in its source code hosted on GitHub. It provides a detailed overview of all the features and use-cases supported by the library, from installation and basic usage to more advanced topics such as defining complex options and adding custom option types.