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.
@@ -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
@@ -1,4 +1,7 @@
1
1
 
2
+ **2.1.1 / 2025-05-15**
3
+ - remove unnecessary check to remove lint error
4
+
2
5
  **2.1.0 / 2025-05-01**
3
6
  - fix e-notation
4
7
  - to return string when invalid enotation is found. Eg `E24`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strnum",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Parse String to Number based on configuration",
5
5
  "type": "module",
6
6
  "main": "strnum.js",
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 || num === -0) return num;
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;