Skip to content

Latest commit

 

History

History

257-hideEmail

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

hideEmail

Interview question of the issue #257 of rendezvous with cassidoo.

The Question

Given a string that has a valid email address, write a function to hide the first part of the email (before the @ sign), minus the first and last character. For extra credit, add a flag to hide the second part after the @ sign to your function excluding the first character and the domain extension.

Examples:

> hideEmail('example@example.com')
> 'e*****e@example.com'

> hideEmail('example+test@example.co.uk', hideFull)
> 'e**********t@e******.co.uk'

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!