refactor(server/utils): re-export escape/unescape instead of wrapping them in function

-> since the functions did not do *anything* other than calling the escape/unescape module -> let's just re-export them directly
This commit is contained in:
Panagiotis Papadopoulos 2025-01-31 23:32:44 +01:00
parent 72f0de6b78
commit d71e127828

View File

@ -81,13 +81,9 @@ export function sanitizeSqlIdentifier(str: string) {
return str.replace(/[^A-Za-z0-9_]/g, "");
}
export function escapeHtml(str: string) {
return escape(str);
}
export const escapeHtml = escape;
export function unescapeHtml(str: string) {
return unescape(str);
}
export const unescapeHtml = unescape;
export function toObject<T, K extends string | number | symbol, V>(array: T[], fn: (item: T) => [K, V]): Record<K, V> {
const obj: Record<K, V> = {} as Record<K, V>; // TODO: unsafe?