strnum 2.1.1 → 2.1.2
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/README.md +6 -0
- package/package.json +1 -1
- package/strnum.js +1 -1
package/README.md
CHANGED
|
@@ -95,3 +95,9 @@ leadingZeros: true, //when number with leading zeros like 08 should be parsed. 0
|
|
|
95
95
|
eNotation: true, //when number with eNotation or number parsed in eNotation should be considered
|
|
96
96
|
skipLike: /regex/ //when string should not be parsed when it matches the specified regular expression
|
|
97
97
|
```
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Try out our other work
|
|
101
|
+
|
|
102
|
+
WishIn - You need it if negative thoughts take over all the time <br>
|
|
103
|
+
<a href="https://play.google.com/store/apps/details?id=com.solothought.wishin"> <img src="https://solothought.com/products/assets/images/wishin/YouTubeThumbnail.png" width="500px"/> </a>
|
package/package.json
CHANGED
package/strnum.js
CHANGED
|
@@ -25,7 +25,7 @@ export default function toNumber(str, options = {}){
|
|
|
25
25
|
return parse_int(trimmedStr, 16);
|
|
26
26
|
// }else if (options.oct && octRegex.test(str)) {
|
|
27
27
|
// return Number.parseInt(val, 8);
|
|
28
|
-
}else if (trimmedStr.
|
|
28
|
+
}else if (trimmedStr.includes('e') || trimmedStr.includes('E')) { //eNotation
|
|
29
29
|
return resolveEnotation(str,trimmedStr,options);
|
|
30
30
|
// }else if (options.parseBin && binRegex.test(str)) {
|
|
31
31
|
// return Number.parseInt(val, 2);
|