1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
metamask-extension/ui/app/helpers/utils/common.util.js
Whymarrh Whitby 4357cda7b8
Fix no-shadow issues (#9246)
See [`no-shadow`](https://eslint.org/docs/rules/no-shadow) for more information.

This change enables `no-shadow` and fixes the issues raised by the rule.
2020-08-18 14:06:45 -02:30

6 lines
143 B
JavaScript

export function camelCaseToCapitalize (str = '') {
return str
.replace(/([A-Z])/ug, ' $1')
.replace(/^./u, (s) => s.toUpperCase())
}