@nemigo/helpers 2.6.0 → 2.6.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.
- package/dist/phymath/index.d.ts +1 -1
- package/dist/phymath/index.js +1 -1
- package/package.json +2 -2
package/dist/phymath/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type RoundMethod = "up" | "down" | "math";
|
|
|
15
15
|
* @param [fraction=2] - Количество знаков после запятой
|
|
16
16
|
* @param [method="math"] - Метод округления
|
|
17
17
|
*/
|
|
18
|
-
export declare const round: (value
|
|
18
|
+
export declare const round: (value?: number | null, fraction?: number, method?: RoundMethod) => number;
|
|
19
19
|
/**
|
|
20
20
|
* Вычисляет сумму всех переданных аргументов
|
|
21
21
|
*
|
package/dist/phymath/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export const normalizero = (value) => (value === 0 ? 0 : value);
|
|
|
14
14
|
* @param [method="math"] - Метод округления
|
|
15
15
|
*/
|
|
16
16
|
export const round = (value, fraction = 2, method = "math") => {
|
|
17
|
-
if (
|
|
17
|
+
if (!value)
|
|
18
18
|
return 0;
|
|
19
19
|
const factor = 10 ** fraction;
|
|
20
20
|
switch (method) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nemigo/helpers",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": {
|
|
@@ -192,6 +192,6 @@
|
|
|
192
192
|
"@std/msgpack": "npm:@jsr/std__msgpack"
|
|
193
193
|
},
|
|
194
194
|
"devDependencies": {
|
|
195
|
-
"@nemigo/configs": "2.6.
|
|
195
|
+
"@nemigo/configs": "2.6.1"
|
|
196
196
|
}
|
|
197
197
|
}
|