diff options
Diffstat (limited to 'packages/react-shared/src/utils/utils.ts')
-rw-r--r-- | packages/react-shared/src/utils/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index 93c7e9f7b..142aea85d 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -1,3 +1,4 @@ +import changeCase = require('change-case'); import isMobile = require('is-mobile'); import * as _ from 'lodash'; import { scroller } from 'react-scroll'; @@ -33,6 +34,9 @@ export const utils = { convertDashesToSpaces(text: string): string { return text.replace(/-/g, ' '); }, + convertCamelCaseToSpaces(text: string): string { + return changeCase.snake(text).replace(/_/g, ' '); + }, getEtherScanLinkIfExists( addressOrTxHash: string, networkId: number, |