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

clap

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

clap - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

17

index.js

@@ -332,3 +332,4 @@ var MAX_LINE_WIDTH = process.stdout.columns || 200;

{
command.args_.apply(command, commandArgs);
//command.args_.apply(command, commandArgs);
resultToken.args = commandArgs;
commandArgs = [];

@@ -390,4 +391,13 @@ }

{
if (command.commands[token])
if (command.commands[token] && (!command.params || commandArgs.length >= command.params.minArgsCount))
{
if (noOptionsYet)
{
resultToken.args = commandArgs;
commandArgs = [];
}
if (command.params && resultToken.args.length < command.params.minArgsCount)
throw new ParseError('Missed required argument(s) for command `' + command.name + '`');
// switch control to another command

@@ -436,2 +446,5 @@ command = command.commands[token];

resultToken.args = commandArgs;
if (command.params && resultToken.args.length < command.params.minArgsCount)
throw new ParseError('Missed required argument(s) for command `' + command.name + '`');
}

@@ -438,0 +451,0 @@

2

package.json

@@ -6,3 +6,3 @@ {

"author": "Roman Dvornov <rdvornov@gmail.com>",
"version": "1.0.3",
"version": "1.0.4",
"keywords": ["cli", "command", "option", "argument", "completion"],

@@ -9,0 +9,0 @@ "homepage": "https://github.com/lahmatiy/clap",

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