@maz-ui/utils 4.1.8-beta.1 → 4.2.1-alpha.10

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.
@@ -0,0 +1,6 @@
1
+ function formatJson(json) {
2
+ return JSON.stringify(json, null, 2);
3
+ }
4
+ export {
5
+ formatJson
6
+ };
@@ -7,6 +7,7 @@ import { debounceCallback } from "./debounceCallback.js";
7
7
  import { debounceId } from "./debounceId.js";
8
8
  import { formatCurrency } from "./formatCurrency.js";
9
9
  import { formatDate } from "./formatDate.js";
10
+ import { formatJson } from "./formatJson.js";
10
11
  import { formatNumber } from "./formatNumber.js";
11
12
  import { getCountryFlagUrl } from "./getCountryFlagUrl.js";
12
13
  import { getErrorMessage } from "./getErrorMessage.js";
@@ -42,6 +43,7 @@ export {
42
43
  debounceId,
43
44
  formatCurrency,
44
45
  formatDate,
46
+ formatJson,
45
47
  formatNumber,
46
48
  getCountryFlagUrl,
47
49
  getErrorMessage,
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import { debounceCallback } from "./helpers/debounceCallback.js";
7
7
  import { debounceId } from "./helpers/debounceId.js";
8
8
  import { formatCurrency } from "./helpers/formatCurrency.js";
9
9
  import { formatDate } from "./helpers/formatDate.js";
10
+ import { formatJson } from "./helpers/formatJson.js";
10
11
  import { formatNumber } from "./helpers/formatNumber.js";
11
12
  import { getCountryFlagUrl } from "./helpers/getCountryFlagUrl.js";
12
13
  import { getErrorMessage } from "./helpers/getErrorMessage.js";
@@ -42,6 +43,7 @@ export {
42
43
  debounceId,
43
44
  formatCurrency,
44
45
  formatDate,
46
+ formatJson,
45
47
  formatNumber,
46
48
  getCountryFlagUrl,
47
49
  getErrorMessage,
@@ -0,0 +1 @@
1
+ export declare function formatJson(json: unknown): string;
@@ -7,6 +7,7 @@ export * from './debounceCallback';
7
7
  export * from './debounceId';
8
8
  export * from './formatCurrency';
9
9
  export * from './formatDate';
10
+ export * from './formatJson';
10
11
  export * from './formatNumber';
11
12
  export * from './getCountryFlagUrl';
12
13
  export * from './getErrorMessage';
@@ -0,0 +1,3 @@
1
+ export type DeepRequired<T> = Required<{
2
+ [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
3
+ }>;
@@ -1,5 +1,6 @@
1
1
  export * from './DeepKeyOf';
2
2
  export * from './DeepPartial';
3
+ export * from './DeepRequired';
3
4
  export * from './FlattenObjectKeys';
4
5
  export * from './GenericInstanceType';
5
6
  export * from './InferMaybeRef';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/utils",
3
3
  "type": "module",
4
- "version": "4.1.8-beta.1",
4
+ "version": "4.2.1-alpha.10",
5
5
  "description": "Utils of maz-ui for JavaScript/TypeScript users",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -52,21 +52,11 @@
52
52
  "engines": {
53
53
  "node": ">=18.0.0"
54
54
  },
55
- "scripts": {
56
- "build": "vite build",
57
- "build:watch": "vite build --watch --mode development",
58
- "typecheck": "tsc --noEmit --skipLibCheck",
59
- "lint": "cross-env NODE_ENV=production eslint .",
60
- "lint:fix": "pnpm lint --fix",
61
- "test:unit": "vitest run",
62
- "test:unit:watch": "vitest watch",
63
- "test:unit:coverage": "vitest run --coverage"
64
- },
65
55
  "devDependencies": {
66
56
  "eslint-plugin-format": "^1.0.2",
67
57
  "glob": "^11.0.3",
68
58
  "libphonenumber-js": "^1.12.24",
69
- "vite": "^7.1.9",
59
+ "vite": "^7.1.10",
70
60
  "vue": "^3.5.22"
71
61
  },
72
62
  "lint-staged": {
@@ -74,5 +64,14 @@
74
64
  "eslint --fix"
75
65
  ]
76
66
  },
77
- "gitHead": "aaa5e6ea54ec9985a778749803ea76cb784d2fb2"
78
- }
67
+ "scripts": {
68
+ "build": "vite build",
69
+ "build:watch": "vite build --watch --mode development",
70
+ "typecheck": "tsc --noEmit --skipLibCheck",
71
+ "lint": "cross-env NODE_ENV=production eslint .",
72
+ "lint:fix": "pnpm lint --fix",
73
+ "test:unit": "vitest run",
74
+ "test:unit:watch": "vitest watch",
75
+ "test:unit:coverage": "vitest run --coverage"
76
+ }
77
+ }