Skip to content

Commit caccecd

Browse files
use toString instead of JSON.stringify
1 parent 6de64a6 commit caccecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/uuid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { v5 as uuid5 } from 'uuid';
33
// Generates UUIDv5, used to consistently generate the same UUID for
44
// a specific identifier and namespace
55
export function generateUuid5(identifier: string | number, namespace: string | number = ''): string {
6-
const stringified = JSON.stringify(identifier) + JSON.stringify(namespace);
6+
const stringified = identifier.toString() + namespace.toString();
77
return uuid5(stringified, uuid5.DNS).toString();
88
}

0 commit comments

Comments
 (0)