From da29ccece5e357b893ce9a5cf145fd6e939c1fb5 Mon Sep 17 00:00:00 2001 From: aakhtar3 Date: Thu, 1 Oct 2020 05:40:40 -0400 Subject: docs(std/uuid): Added JSdocs for the std/uuid module (#7735) --- std/uuid/v1.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'std/uuid/v1.ts') diff --git a/std/uuid/v1.ts b/std/uuid/v1.ts index ef1882d85..4adb0d6f9 100644 --- a/std/uuid/v1.ts +++ b/std/uuid/v1.ts @@ -6,6 +6,10 @@ const UUID_RE = new RegExp( "i", ); +/** + * Validates the UUID v1 + * @param id UUID value + */ export function validate(id: string): boolean { return UUID_RE.test(id); } @@ -25,6 +29,12 @@ type V1Options = { rng?: () => number[]; }; +/** + * Generates a RFC4122 v1 UUID (time-based) + * @param options Can use RFC time sequence values as overwrites + * @param buf Can allow the UUID to be written in byte-form starting at the offset + * @param offset Index to start writing on the UUID bytes in buffer + */ export function generate( options?: V1Options | null, buf?: number[], -- cgit v1.2.3