newStaffLDB-API #48

Merged
fred.boniface merged 85 commits from newStaffLDB-API into main 2023-10-03 21:35:03 +01:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 05c9e061dc - Show all commits

View File

@ -24,7 +24,7 @@ function cleanNrcc(input: string) {
function getDomainFromEmail(mail: string) { function getDomainFromEmail(mail: string) {
// Needs testing // Needs testing
let split = mail.split("@"); let split = mail.split("@");
return split[1]; return split[1].toLowerCase();
} }
module.exports = { module.exports = {

View File

@ -9,6 +9,7 @@ describe("Sanitize Email", () => {
"I%Have{Special}%Characters@example.com", "I%Have{Special}%Characters@example.com",
"Basic.address@example.com", "Basic.address@example.com",
`"very.(),:;<>[]\".VERY.\"very\ \"very\".unusual"@example.com`, `"very.(),:;<>[]\".VERY.\"very\ \"very\".unusual"@example.com`,
"THIS_EMAIL_CONTAINS_CAPITALISED_DOMAIN@EXAMPLE.COM"
]; ];
const expectedOutput = "example.com"; const expectedOutput = "example.com";
for (const addr of inputs) { for (const addr of inputs) {