-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix encode, decode and uuid docs examples (#929)
- Loading branch information
1 parent
8ae3205
commit 85d493a
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { randomUUID } from 'node:crypto'; | ||
|
||
/** | ||
* Generates a UUID (Universally Unique Identifier). | ||
* Generates a UUID (Universally Unique Identifier) | ||
* @function | ||
* @public | ||
* @namespace util | ||
* @returns {string} - A newly generated UUID. | ||
* @returns {string} - A newly generated UUID | ||
* @example <caption>Generate a UUID</caption> | ||
* const id = uuid(); | ||
* const id = util.uuid(); | ||
* console.log(id); // Output:'3f4e254e-8f6f-4f8b-9651-1c1c262cc83f' | ||
*/ | ||
export const uuid = () => randomUUID(); |