mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
19 lines
385 B
JavaScript
19 lines
385 B
JavaScript
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, ' ');
|
|
}
|
|
|
|
export function formatAccountType(accountType) {
|
|
if (accountType === 'default') {
|
|
return 'metamask';
|
|
}
|
|
|
|
return accountType;
|
|
}
|