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

dashdash

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dashdash - npm Package Versions

13

1.10.0

Diff

Changelog

Source

1.10.0

  • [issue #9] Support includeDefault in help config (similar to includeEnv) to have a note of an option's default value, if any, in help output.
  • [issue #11] Fix option group breakage introduced in v1.9.0.
trentm
published 1.9.0 •

Changelog

Source

1.9.0

  • [issue #10] Custom option types added with addOptionType can specify a "default" value. See "examples/custom-option-fruit.js".
trentm
published 1.8.0 •

Changelog

Source

1.8.0

  • Support hidden: true in an option spec to have help output exclude this option.
trentm
published 1.7.3 •

Changelog

Source

1.7.3

  • [issue #8] Fix parsing of a short option group when one of the option takes an argument. For example, consider tail with a -f boolean option and a -n option that takes a number argument. This should parse:

      tail -fn5
    

    Before this change, that would not parse correctly. It is suspected that this was introduced in version 1.4.0 (with commit 656fa8bc71c372ebddad0a7026bd71611e2ec99a).

trentm
published 1.7.2 •

Changelog

Source

1.7.2

  • Known issues: #8

  • Exclude 'tools/' dir in packages published to npm.

trentm
published 1.7.1 •

Changelog

Source

1.7.1

  • Known issues: #8

  • Support an option group empty string value:

      ...
      { group: '' },
      ...
    

    to render as a blank line in option help. This can help separate loosely related sets of options without resorting to a title for option groups.

trentm
published 1.7.0 •

Changelog

Source

1.7.0

  • Known issues: #8

  • [pull #7] Support for <parser>.help({helpWrap: false, ...}) option to be able to fully control the formatting for option help (by Patrick Mooney) helpWrap: false can also be set on individual options in the option objects, e.g.:

      var options = [
          {
            names: ['foo'],
            type: 'string',
            helpWrap: false,
            help: 'long help with\n  newlines' +
              '\n  spaces\n  and such\nwill render correctly'
          },
          ...
      ];
    
trentm
published 1.6.0 •

Changelog

Source

1.6.0

  • Known issues: #8

  • [pull #6] Support headings between groups of options (by Joshua M. Clulow) so that this code:

      var options = [
          { group: 'Armament Options' },
          { names: [ 'weapon', 'w' ], type: 'string' },
          { group: 'General Options' },
          { names: [ 'help', 'h' ], type: 'bool' }
      ];
      ...
    

    will give you this help output:

      ...
        Armament Options:
          -w, --weapon
    
        General Options:
          -h, --help
      ...
    
trentm
published 1.5.0 •

Changelog

Source

1.5.0

  • Known issues: #8

  • Add support for adding custom option types. "examples/custom-option-duration.js" shows an example adding a "duration" option type.

      $ node custom-option-duration.js -t 1h
      duration: 3600000 ms
      $ node custom-option-duration.js -t 1s
      duration: 1000 ms
      $ node custom-option-duration.js -t 5d
      duration: 432000000 ms
      $ node custom-option-duration.js -t bogus
      custom-option-duration.js: error: arg for "-t" is not a valid duration: "bogus"
    

    A custom option type is added via:

      var dashdash = require('dashdash');
      dashdash.addOptionType({
          name: '...',
          takesArg: true,
          helpArg: '...',
          parseArg: function (option, optstr, arg) {
              ...
          }
      });
    
  • [issue #4] Add date and arrayOfDate option types. They accept these date formats: epoch second times (e.g. 1396031701) and ISO 8601 format: YYYY-MM-DD[THH:MM:SS[.sss][Z]] (e.g. "2014-03-28", "2014-03-28T18:35:01.489Z"). See "examples/date.js" for an example usage.

      $ node examples/date.js -s 2014-01-01 -e $(date +%s)
      start at 2014-01-01T00:00:00.000Z
      end at 2014-03-29T04:26:18.000Z
    
trentm
published 1.4.0 •

Changelog

Source

1.4.0

  • Known issues: #8

  • [pull #2, pull #3] Add a allowUnknown: true option on createParser to allow unknown options to be passed through as opts._args instead of parsing throwing an exception (by https://github.com/isaacs).

    See 'allowUnknown' in the README for a subtle caveat.

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