Comparing version 1.9.0-60-preserve-raw-string-values-16bbf866b6badd07be27cf2710dab78388aa3212 to 1.9.0-60-preserve-raw-string-values-6f4aabcd619688271b45604dfa3495c4306de4e1
@@ -7,3 +7,3 @@ # Change Log | ||
## 1.9.0 - 2019-02-22 | ||
## 1.9.0 - 2019-02-25 | ||
@@ -10,0 +10,0 @@ * Preserve string value of looks-like-integer parameters [Paulo Castro] |
{ | ||
"name": "capitano", | ||
"version": "1.9.0-60-preserve-raw-string-values-16bbf866b6badd07be27cf2710dab78388aa3212", | ||
"version": "1.9.0-60-preserve-raw-string-values-6f4aabcd619688271b45604dfa3495c4306de4e1", | ||
"description": "Powerful, non opitionated command line parser for serious applications", | ||
@@ -5,0 +5,0 @@ "main": "build/capitano.js", |
@@ -316,2 +316,15 @@ Capitano | ||
*** | ||
### Integer parameter parsing | ||
Capitano will automatically call `parseInt` on parameters that consist of numbers only, like '0123' | ||
(matched against a regular expression). Sometimes this may not desirable, for example if leading | ||
zeroes must be preserved. If Capitano calls `parseInt` on a parameter, a copy of the original value | ||
is preserved under a parameter name with the added '\_raw' suffix. For example, if the original | ||
value of parameter `foo` was `'0123'`, `params.foo` will contain `123` (number type) and | ||
`params.foo_raw` will contain `'0123'` (string type). | ||
*** | ||
Examples | ||
@@ -318,0 +331,0 @@ -------- |
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
156988
476