@hhgtech/hhg-components
Version:
Hello Health Group common components
24 lines (21 loc) • 830 B
JavaScript
import './index-90813715.js';
import { L as LOCALE } from './Locale-f270bd9d.js';
// https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
const MAPPED_LOCALE = {
[]: 'VN',
[]: 'KH',
[]: 'ID',
[]: 'MY',
[]: 'PH',
[]: 'PH',
[]: 'TW',
[]: 'TH',
[]: 'MM',
};
const hiddenEmailChar = (str = '') => {
const domainIndex = str.indexOf('@');
const leftSide = str.substring(0, domainIndex);
const startMask = leftSide.length > 3 ? 3 : leftSide.length;
return str.replace(str.substring(startMask, domainIndex), str.slice(startMask, domainIndex).replace(/./g, 'x'));
};
export { MAPPED_LOCALE as M, hiddenEmailChar as h };