## Context The method was very simple and deterministic, I'm moving its logic to a util so we don't have to import a service to use it.
8 lines
226 B
TypeScript
8 lines
226 B
TypeScript
export const uuidToBase36 = (uuid: string): string => {
|
|
const hexString = uuid.replace(/-/g, '');
|
|
const base10Number = BigInt('0x' + hexString);
|
|
const base36String = base10Number.toString(36);
|
|
|
|
return base36String;
|
|
};
|