Files
bigcapital/packages/server/src/utils/sanitizers.ts
2024-08-15 23:47:21 +02:00

5 lines
192 B
TypeScript

export function sanitizeDatabaseName(dbName: string) {
// Replace any character that is not alphanumeric or an underscore with an underscore
return dbName.replace(/[^a-zA-Z0-9_]/g, '');
}