@xylabs/decimal-precision 2.12.13 → 2.12.14
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/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export const toDecimalPrecision = (value: number, digits: number) => {\n let fixed = 0\n const result = parseFloat(value.toPrecision(digits))\n while (parseFloat(result.toFixed(fixed)) !== result && fixed < 20) {\n fixed++\n }\n return result.toFixed(fixed)\n}\n"],"mappings":"AAAO,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export const toDecimalPrecision = (value: number, digits: number) => {\n let fixed = 0\n const result = parseFloat(value.toPrecision(digits))\n while (parseFloat(result.toFixed(fixed)) !== result && fixed < 20) {\n fixed++\n }\n return result.toFixed(fixed)\n}\n"],"mappings":";AAAO,IAAM,qBAAqB,CAAC,OAAe,WAAmB;AACnE,MAAI,QAAQ;AACZ,QAAM,SAAS,WAAW,MAAM,YAAY,MAAM,CAAC;AACnD,SAAO,WAAW,OAAO,QAAQ,KAAK,CAAC,MAAM,UAAU,QAAQ,IAAI;AACjE;AAAA,EACF;AACA,SAAO,OAAO,QAAQ,KAAK;AAC7B;","names":[]}
|
package/package.json
CHANGED
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"esm"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
43
|
-
"@xylabs/tsconfig": "^3.0.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.79",
|
|
43
|
+
"@xylabs/tsconfig": "^3.0.79",
|
|
44
44
|
"typescript": "^5.2.2"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
|
-
"version": "2.12.
|
|
54
|
+
"version": "2.12.14",
|
|
55
55
|
"type": "module"
|
|
56
56
|
}
|