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

command-line-args

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

command-line-args - npm Package Compare versions

Comparing version 4.0.4 to 4.0.5

test/multiple.js

7

lib/output.js

@@ -36,5 +36,2 @@ 'use strict'

this.output[def.name].valueSource = 'default'
} else {
/* guarantees a `multiple` returns an array, even without a defaultValue */
if (def.multiple) this.output[def.name] = new OutputValue([])
}

@@ -51,2 +48,4 @@ })

if (def.multiple) outputValue.value = outputValue.value || []
/* for boolean types, set value to `true`. For all other types run value through setter function. */

@@ -79,2 +78,4 @@ if (def.isBoolean()) {

if (def.multiple) outputValue.value = outputValue.value || []
/* run value through setter function. */

@@ -81,0 +82,0 @@ valueArg.value = def.type(valueArg.value)

{
"name": "command-line-args",
"version": "4.0.4",
"version": "4.0.5",
"description": "A mature, feature-complete library to parse command-line options.",

@@ -29,3 +29,3 @@ "repository": "https://github.com/75lb/command-line-args.git",

"devDependencies": {
"coveralls": "^2.13.0",
"coveralls": "^2.13.1",
"jsdoc-to-markdown": "^3.0.0",

@@ -37,4 +37,4 @@ "test-runner": "^0.3.0"

"find-replace": "^1.0.3",
"typical": "^2.6.0"
"typical": "^2.6.1"
}
}

@@ -1,3 +0,3 @@

[![view on npm](http://img.shields.io/npm/v/command-line-args.svg)](https://www.npmjs.org/package/command-line-args)
[![npm module downloads](http://img.shields.io/npm/dt/command-line-args.svg)](https://www.npmjs.org/package/command-line-args)
[![view on npm](https://img.shields.io/npm/v/command-line-args.svg)](https://www.npmjs.org/package/command-line-args)
[![npm module downloads](https://img.shields.io/npm/dt/command-line-args.svg)](https://www.npmjs.org/package/command-line-args)
[![Build Status](https://travis-ci.org/75lb/command-line-args.svg?branch=master)](https://travis-ci.org/75lb/command-line-args)

@@ -4,0 +4,0 @@ [![Coverage Status](https://coveralls.io/repos/github/75lb/command-line-args/badge.svg?branch=master)](https://coveralls.io/github/75lb/command-line-args?branch=master)

@@ -56,3 +56,3 @@ 'use strict'

const output = new Output(definitions)
a.deepStrictEqual(output.get('one'), [ ])
a.deepStrictEqual(output.get('one'), undefined)
output.setOptionValue('--one', '2')

@@ -94,3 +94,3 @@ a.deepStrictEqual(output.get('one'), [ 2 ])

const output = new Output(definitions)
a.deepStrictEqual(output.get('one'), [])
a.deepStrictEqual(output.get('one'), undefined)
output.setValue('1')

@@ -97,0 +97,0 @@ a.deepStrictEqual(output.get('one'), [ '1' ])

@@ -26,9 +26,1 @@ 'use strict'

})
/* currently not supported, it would complain --yeah is an invalid option */
runner.skip('type-string: pass a value resembling an option', function () {
a.deepStrictEqual(
commandLineArgs(definitions, { argv: [ '--one', '--yeah' ] }),
{ one: '--yeah' }
)
})

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