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.0 to 1.0.1

7

build/parameter.js

@@ -81,11 +81,6 @@ var Parameter, REGEX_OPTIONAL, REGEX_REQUIRED, REGEX_VARIADIC, parse, _;

if (this.isRequired()) {
if (parameterWordsLength !== 1) {
if (parameterWordsLength < 1) {
return false;
}
}
if (this.isOptional()) {
if (parameterWordsLength > 1) {
return false;
}
}
}

@@ -92,0 +87,0 @@ return true;

21

build/parse.js

@@ -41,6 +41,25 @@ var minimist, settings, state, _;

exports.split = function(string) {
var pair, regex, result;
if (string == null) {
return [];
}
return string.match(/[\w-\*]+|[<\[][^<\[]+[>\]]/g) || [];
regex = '';
pair = function(_arg) {
var end, start;
start = _arg[0], end = _arg[1];
start = '\\' + start;
end = '\\' + end;
return regex += "" + start + "[^" + end + "]+" + end + "|";
};
pair('[]');
pair('<>');
pair('""');
pair("''");
regex += '\\S+';
result = string.match(new RegExp(regex, 'g')) || [];
return _.map(result, function(word) {
word = _.str.unquote(word, '\'');
word = _.str.unquote(word, '"');
return word;
});
};

@@ -47,0 +66,0 @@

{
"name": "capitano",
"version": "1.0.0",
"version": "1.0.1",
"description": "Powerful, non opitionated command line parser for serious applications",

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

@@ -5,4 +5,5 @@ Capitano

[![npm version](https://badge.fury.io/js/capitano.svg)](http://badge.fury.io/js/capitano)
[![dependencies](https://david-dm.org/resin-io/capitano.png)](https://david-dm.org/username/repo.png)
Capitano allows you to craft powerful command line application, your way.
Capitano allows you to craft powerful command line applications, your way.

@@ -206,7 +207,7 @@ ```coffee

### Signature#hasVariadicParameters()
#### Signature#hasVariadicParameters()
A predicate method that returns `true` if the signature has at least one variadic parameter.
### isWildcard()
#### Signature#isWildcard()

@@ -225,11 +226,11 @@ A predicate method that returns `true` if the signature represents a wildcard.

### Option#alias (string|[string])
#### Option#alias (string|[string])
A string or array of string alias.
### Option#boolean (boolean)
#### Option#boolean (boolean)
Whether the option is boolean or not.
### Option#parameter (string)
#### Option#parameter (string)

@@ -325,2 +326,9 @@ An option parameter (optional).

ChangeLog
---------
### 1.0.1
- Fix issues with path and quoted multi string parameters.
Contribute

@@ -327,0 +335,0 @@ ----------

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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