New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fnmain/number

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fnmain/number - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

2

dist/index.js

@@ -119,5 +119,5 @@ "use strict";

}
return val.toString().replace(/(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
exports.formatWithCommas = formatWithCommas;
//# sourceMappingURL=index.js.map

@@ -31,6 +31,7 @@ "use strict";

console.log((0, index_1.isNotNumber)(null)); // true
console.log((0, index_1.formatWithCommas)(12345.6789)); // 12,345.6789
console.log((0, index_1.formatWithCommas)("12345.6789")); // 12,345.6789
console.log((0, index_1.formatWithCommas)(12345.6789)); // 12,345.678,9
console.log((0, index_1.formatWithCommas)("12345.6789")); // 12,345.678,9
console.log((0, index_1.formatWithCommas)("123")); // 123
console.log((0, index_1.formatWithCommas)("abc")); // "NaN"
console.log((0, index_1.formatWithCommas)("abc", { strNaN: "" })); // ""
//# sourceMappingURL=test.js.map
{
"name": "@fnmain/number",
"version": "1.6.0",
"version": "1.6.1",
"description": "number utils",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -143,3 +143,3 @@ type Options = {

}
return val.toString().replace(/(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

@@ -35,5 +35,6 @@ import { formatWithCommas, isNotNumber, isNumber, parseNumber, toAuto, toPercent } from "./index";

console.log(formatWithCommas(12345.6789)); // 12,345.6789
console.log(formatWithCommas("12345.6789")); // 12,345.6789
console.log(formatWithCommas(12345.6789)); // 12,345.678,9
console.log(formatWithCommas("12345.6789")); // 12,345.678,9
console.log(formatWithCommas("123")); // 123
console.log(formatWithCommas("abc")); // "NaN"
console.log(formatWithCommas("abc", { strNaN: "" })); // ""

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc