uuidjs/uuid

[BUG] Why is this not a valid GUID?

matthiaslischka opened this issue · 1 comments

Before you begin...

  • I have searched the existing issues
  • I am not using version 13.x of node (if so, please upgrade)

Description of the problem

"49C1577D-2CB7-41BB-1CF3-08D960A71AAF" should be a valid GUID imho.

Recipe for reproducing

import { validate } from "uuid";

const isValid1 = validate("49C1577D-2CB7-41BB-1CF3-08D960A71AAF"); // <---- ?!
const isValid2 = validate("93595E16-CE95-4ACD-80F4-66CE17C6D906");
console.log({ isValid1 }); // false
console.log({ isValid2 }); // true

Additional information

https://codesandbox.io/s/typescript-playground-export-forked-lecdtm

I checked multiple online validators and all said that this Guid is valid. Dunno what's going on.

THX and BR,
Matthias

Environment

No response

Invalid variant field.

The "1" in 1CF3 must be 8, 9, A, or B, per https://www.rfc-editor.org/rfc/rfc4122#section-4.1.1