strnum 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/SECURITY.md +5 -0
- package/CHANGELOG.md +3 -0
- package/package.json +1 -1
- package/strnum.js +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
If you believe you have found a security vulnerability in this repository which can be potentially harful for the users in anyway, please do not report security vulnerabilities through public GitHub issues. Instead, please report it to us as described below.
|
|
2
|
+
|
|
3
|
+
## Security contact information
|
|
4
|
+
|
|
5
|
+
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/strnum.js
CHANGED
|
@@ -52,7 +52,7 @@ export default function toNumber(str, options = {}){
|
|
|
52
52
|
const num = Number(trimmedStr);
|
|
53
53
|
const parsedStr = String(num);
|
|
54
54
|
|
|
55
|
-
if( num === 0
|
|
55
|
+
if( num === 0) return num;
|
|
56
56
|
if(parsedStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation
|
|
57
57
|
if(options.eNotation) return num;
|
|
58
58
|
else return str;
|