mhz-helpers 1.0.75 → 1.0.76

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,5 +1,5 @@
1
1
  export declare function formatDate(dateRaw?: string | Date, lang?: 'ru' | 'en'): string;
2
2
  export declare function formatDateTime(dateRaw?: string | Date, lang?: 'ru' | 'en'): string;
3
3
  export declare function addZero(value: number): string;
4
- export declare function formatDuration(duration: number): string;
4
+ export declare function formatDuration(duration?: number): string;
5
5
  export declare function subtractDates(dateRaw1?: string | Date, dateRaw2?: string | Date, isRawResult?: boolean): string | number;
package/dist/index.js CHANGED
@@ -960,8 +960,9 @@ function Jr(t) {
960
960
  return t.toString().length > 1 ? `${t}` : `0${t}`;
961
961
  }
962
962
  function Gr(t) {
963
+ if (!t) return "-";
963
964
  const e = Math.floor(t / 60), n = t - e * 60;
964
- return `${e} мин. ${Jr(n)} сек.`;
965
+ return `${e ? `${e} мин. ` : ""}${Jr(n)} сек.`;
965
966
  }
966
967
  function No(t, e, n) {
967
968
  if (!t || !e) return "-";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-helpers",
3
3
  "description": "9000 Mhz frontend helpers and composables",
4
- "version": "1.0.75",
4
+ "version": "1.0.76",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "stylelint-prettier": "5.0.2",
51
51
  "typescript": "5.6.3",
52
52
  "typescript-eslint": "8.17.0",
53
- "vite": "6.0.2",
53
+ "vite": "6.0.3",
54
54
  "vite-plugin-dts": "4.3.0",
55
55
  "vue-eslint-parser": "9.4.3",
56
56
  "vue-linters-config": "0.3.10",