@umituz/react-native-uuid 1.2.2 → 1.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-uuid",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Cross-platform UUID generation utility for React Native apps using expo-crypto",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -4,4 +4,5 @@
4
4
  * Cross-platform UUID generation for React Native apps
5
5
  */
6
6
 
7
- export { generateUUID } from './infrastructure/utils/UUIDUtils';
7
+ export { generateUUID, generateUUID as uuidv4 } from './infrastructure/utils/UUIDUtils';
8
+ export type { UUID } from './types/UUID';
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import * as Crypto from 'expo-crypto';
9
+ import type { UUID } from '../../types/UUID';
9
10
 
10
11
  /**
11
12
  * Generate a v4 UUID
@@ -21,7 +22,7 @@ import * as Crypto from 'expo-crypto';
21
22
  * // Returns: "550e8400-e29b-41d4-a716-446655440000"
22
23
  * ```
23
24
  */
24
- export const generateUUID = (): string => {
25
+ export const generateUUID = (): UUID => {
25
26
  return Crypto.randomUUID();
26
27
  };
27
28
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * UUID Type Definition
3
+ */
4
+
5
+ /**
6
+ * UUID v4 string type
7
+ * Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
8
+ */
9
+ export type UUID = string;