Cheer up linter

This commit is contained in:
Oliver Blanthorn 2025-11-24 13:00:16 +01:00
parent ab5e5c4649
commit d88fa4e975
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -70,11 +70,10 @@ export function bucketize(
}
// thanks daniel metzner https://stackoverflow.com/questions/59412625/generate-random-uuid-javascript#tab-top
export function uuidv4(): string {
// @ts-ignore
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
// tslint:disable-next-line:no-bitwise
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
export function uuidv4(): string {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
// eslint-disable-next-line no-bitwise
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
)
}