yargs-parser
Advanced tools
Comparing version 20.2.4 to 20.2.5
export function camelCase(str) { | ||
str = str.toLocaleLowerCase(); | ||
// Handle the case where an argument is provided as camel case, e.g., fooBar. | ||
// by ensuring that the string isn't already mixed case: | ||
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); | ||
if (!isCamelCase) { | ||
str = str.toLocaleLowerCase(); | ||
} | ||
if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { | ||
@@ -18,3 +23,2 @@ return str; | ||
nextChrUpper = true; | ||
continue; | ||
} | ||
@@ -21,0 +25,0 @@ else if (chr !== '-' && chr !== '_') { |
@@ -5,2 +5,9 @@ # Changelog | ||
### [20.2.5](https://www.github.com/yargs/yargs-parser/compare/v20.2.4...v20.2.5) (2021-02-13) | ||
### Bug Fixes | ||
* do not lowercase camel cased string ([#348](https://www.github.com/yargs/yargs-parser/issues/348)) ([5f4da1f](https://www.github.com/yargs/yargs-parser/commit/5f4da1f17d9d50542d2aaa206c9806ce3e320335)) | ||
### [20.2.4](https://www.github.com/yargs/yargs-parser/compare/v20.2.3...v20.2.4) (2020-11-09) | ||
@@ -7,0 +14,0 @@ |
{ | ||
"name": "yargs-parser", | ||
"version": "20.2.4", | ||
"version": "20.2.5", | ||
"description": "the mighty option parser used by yargs", | ||
@@ -5,0 +5,0 @@ "main": "build/index.cjs", |
Sorry, the diff of this file is not supported yet
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
120389
2221