Move getSchemaName to util (#13357)
## 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.
This commit is contained in:
@ -28,6 +28,7 @@ export { getUrlHostnameOrThrow } from './url/getUrlHostnameOrThrow';
|
||||
export { isValidHostname } from './url/isValidHostname';
|
||||
export { isValidUrl } from './url/isValidUrl';
|
||||
export { lowercaseUrlOriginAndRemoveTrailingSlash } from './url/lowercaseUrlOriginAndRemoveTrailingSlash';
|
||||
export { uuidToBase36 } from './uuidToBase36';
|
||||
export { isDefined } from './validation/isDefined';
|
||||
export { isLabelIdentifierFieldMetadataTypes } from './validation/isLabelIdentifierFieldMetadataTypes';
|
||||
export { isValidLocale } from './validation/isValidLocale';
|
||||
|
||||
7
packages/twenty-shared/src/utils/uuidToBase36.ts
Normal file
7
packages/twenty-shared/src/utils/uuidToBase36.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export const uuidToBase36 = (uuid: string): string => {
|
||||
const hexString = uuid.replace(/-/g, '');
|
||||
const base10Number = BigInt('0x' + hexString);
|
||||
const base36String = base10Number.toString(36);
|
||||
|
||||
return base36String;
|
||||
};
|
||||
Reference in New Issue
Block a user