Skip to content

Commit

Permalink
remove unnecessary comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascaro committed Jul 2, 2019
1 parent f9a184d commit 4453d43
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions uuid/v4.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import { NIL_UUID } from "./mod.ts";

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
/**
* Super-small uuid generation.
*
* Based on
* https://gist.github.com/jed/982883
*/

const UUID_RE = new RegExp(
"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
Expand All @@ -18,9 +10,6 @@ export function validate(id: string): boolean {
}

export default function generate(): string {
// Generate 16 random bytes
// adjust 4 msb of 7th byte to 0100
// set 2 msb of 9th byte to 10
return "00000000-0000-4000-8000-000000000000".replace(
/[0]/g,
(): string =>
Expand Down

0 comments on commit 4453d43

Please sign in to comment.