Update Account
This commit is contained in:
@@ -389,5 +389,20 @@ Vue.use({
|
||||
message: '',
|
||||
};
|
||||
};
|
||||
|
||||
Vue.prototype.$maskEmailAdvanced = (email) => {
|
||||
if (!email) return '';
|
||||
|
||||
const [name, domain] = email.split('@');
|
||||
if (!name || !domain) return email;
|
||||
|
||||
const [domainName, ext] = domain.split('.');
|
||||
|
||||
const maskedName = name.slice(0, 2) + '*'.repeat(Math.max(name.length - 2, 1));
|
||||
|
||||
const maskedDomain = domainName[0] + '*'.repeat(Math.max(domainName.length - 1, 1));
|
||||
|
||||
return `${maskedName}@${maskedDomain}.${ext}`;
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user