Skip to content

Commit 5cce789

Browse files
authored
Update uuid.ts
update so just adding test
1 parent 1a9d9d3 commit 5cce789

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/uuid.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ export function stringToUuid(target: string | number): UUID {
3737
hashBuffer[i / 2] = parseInt(hash.slice(i, i + 2), 16);
3838
}
3939

40-
hashBuffer[6] = (hashBuffer[6] & 0x0f) | 0x50;
41-
4240
return (_uint8ArrayToHex(hashBuffer.slice(0, 4)) +
4341
"-" +
4442
_uint8ArrayToHex(hashBuffer.slice(4, 6)) +
4543
"-" +
46-
_uint8ToHex(hashBuffer[6]) +
44+
_uint8ToHex(hashBuffer[6] & 0x0f) +
4745
_uint8ToHex(hashBuffer[7]) +
4846
"-" +
4947
_uint8ToHex((hashBuffer[8] & 0x3f) | 0x80) +

0 commit comments

Comments
 (0)