🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

strnum

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strnum - npm Package Compare versions

Comparing version

to
2.1.1

.github/SECURITY.md

3

CHANGELOG.md
**2.1.1 / 2025-05-15**
- remove unnecessary check to remove lint error
**2.1.0 / 2025-05-01**

@@ -3,0 +6,0 @@ - fix e-notation

2

package.json
{
"name": "strnum",
"version": "2.1.0",
"version": "2.1.1",
"description": "Parse String to Number based on configuration",

@@ -5,0 +5,0 @@ "type": "module",

@@ -55,3 +55,3 @@ const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;

if( num === 0 || num === -0) return num;
if( num === 0) return num;
if(parsedStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation

@@ -58,0 +58,0 @@ if(options.eNotation) return num;