@trackunit/shared-utils 0.0.76 → 0.0.77

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.
Files changed (2) hide show
  1. package/package.json +4 -2
  2. package/src/UUID.d.ts +23 -0
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@trackunit/shared-utils",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=20.x"
8
8
  },
9
- "dependencies": {},
9
+ "dependencies": {
10
+ "uuid": "^9.0.1"
11
+ },
10
12
  "module": "./index.esm.js",
11
13
  "main": "./index.cjs.js",
12
14
  "types": "./index.esm.d.ts"
package/src/UUID.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Generates a version 3 UUID (namespace with MD5).
3
+ *
4
+ * @param {string} name - The name for which to generate the UUID.
5
+ * @param {string | Buffer} namespace - The namespace for the UUID.
6
+ * @returns {string} A version 3 UUID.
7
+ */
8
+ declare const uuidv3: (name: string, namespace: string | Buffer) => string;
9
+ /**
10
+ * Generates a version 4 UUID using the Node.js crypto module.
11
+ *
12
+ * @returns {string} A version 4 UUID.
13
+ */
14
+ declare const uuidv4: () => string;
15
+ /**
16
+ * Generates a version 5 UUID (namespace with SHA-1).
17
+ *
18
+ * @param {string} name - The name for which to generate the UUID.
19
+ * @param {string | Buffer} namespace - The namespace for the UUID.
20
+ * @returns {string} A version 5 UUID.
21
+ */
22
+ declare const uuidv5: (name: string, namespace: string | Buffer) => string;
23
+ export { uuidv3, uuidv4, uuidv5 };