kcommons 14.11.0 → 14.11.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.
@@ -1 +1 @@
1
- export declare function toFixedDecimal(num: any): string;
1
+ export declare function toFixedDecimal(num: any, decimal?: number): string;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toFixedDecimal = toFixedDecimal;
4
- function toFixedDecimal(num) {
4
+ function toFixedDecimal(num, decimal) {
5
5
  if (num === undefined ||
6
6
  num === null ||
7
7
  typeof num !== "number" ||
8
8
  isNaN(num))
9
9
  return "-";
10
- return Number(Number(String(num).trim()).toFixed(2)).toLocaleString("en-IN");
10
+ return Number(Number(String(num).trim()).toFixed(decimal || 0)).toLocaleString("en-IN");
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "14.11.0",
3
+ "version": "14.11.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",