Comparing version 3.20.0 to 3.21.0
@@ -156,7 +156,7 @@ var assert = require('assert') | ||
} else { | ||
if (defaultDescription) options.defaultDescription[key] = defaultDescription | ||
if (typeof value === 'function') { | ||
defaultDescription = usage.functionDescription(value, defaultDescription) | ||
if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) | ||
value = value.call() | ||
} | ||
options.defaultDescription[key] = defaultDescription | ||
options.default[key] = value | ||
@@ -300,2 +300,4 @@ } | ||
self.count(key) | ||
} if (opt.defaultDescription) { | ||
options.defaultDescription[key] = opt.defaultDescription | ||
} | ||
@@ -302,0 +304,0 @@ |
@@ -274,6 +274,3 @@ // this file handles outputting usage instructions, | ||
self.functionDescription = function (fn, defaultDescription) { | ||
if (defaultDescription) { | ||
return defaultDescription | ||
} | ||
self.functionDescription = function (fn) { | ||
var description = fn.name ? decamelize(fn.name, '-') : __('generated-value') | ||
@@ -303,3 +300,3 @@ return ['(', description, ')'].join('') | ||
if (value === undefined) return null | ||
if (value === undefined && !defaultDescription) return null | ||
@@ -306,0 +303,0 @@ if (defaultDescription) { |
{ | ||
"name": "yargs", | ||
"version": "3.20.0", | ||
"version": "3.21.0", | ||
"description": "Light-weight option parsing with an argv hash. No optstrings attached.", | ||
@@ -14,14 +14,14 @@ "main": "./index.js", | ||
"dependencies": { | ||
"camelcase": "^1.0.2", | ||
"camelcase": "^1.2.1", | ||
"cliui": "^2.1.0", | ||
"decamelize": "^1.0.0", | ||
"os-locale": "^1.2.0", | ||
"window-size": "^0.1.1", | ||
"window-size": "^0.1.2", | ||
"y18n": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.0.0", | ||
"chai": "^3.2.0", | ||
"coveralls": "^2.11.4", | ||
"hashish": "0.0.4", | ||
"mocha": "^2.2.1", | ||
"mocha": "^2.2.5", | ||
"nyc": "^3.1.0", | ||
@@ -28,0 +28,0 @@ "standard": "^5.1.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123365
1624
Updatedcamelcase@^1.2.1
Updatedwindow-size@^0.1.2