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

capitano

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capitano - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

7

build/parse.js

@@ -83,2 +83,9 @@ var Parameter, minimist, settings, state, _;

value = definedOption.getOptionsValue(options);
if ((definedOption.required != null) && (value == null)) {
if (_.isString(definedOption.required)) {
throw new Error(definedOption.required);
} else if (definedOption.required) {
throw new Error("Option " + definedOption.signature + " is required");
}
}
if (!definedOption.matches(value)) {

@@ -85,0 +92,0 @@ continue;

2

package.json
{
"name": "capitano",
"version": "1.0.4",
"version": "1.1.0",
"description": "Powerful, non opitionated command line parser for serious applications",

@@ -5,0 +5,0 @@ "main": "build/capitano.js",

@@ -236,2 +236,6 @@ Capitano

### Option#required (boolean|string)
Defines whether an option is required. If the field is `true`, a generic error is thrown, otherwise you can set a custom error message by setting to a `string`.
Examples

@@ -327,2 +331,6 @@ --------

### 1.1.0
- Implement support for required options.
### 1.0.4

@@ -329,0 +337,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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