1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/ui/helpers/utils/metrics.js

19 lines
385 B
JavaScript
Raw Normal View History

export function getMethodName(camelCase) {
if (!camelCase || typeof camelCase !== 'string') {
return '';
}
return camelCase
.replace(/([a-z])([A-Z])/gu, '$1 $2')
.replace(/([A-Z])([a-z])/gu, ' $1$2')
.replace(/ +/gu, ' ');
}
2023-04-27 16:28:08 +02:00
export function formatAccountType(accountType) {
if (accountType === 'default') {
return 'metamask';
}
return accountType;
}