mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2025-01-16 03:06:39 +00:00
Code Cleanup
cleaned up the if condition
This commit is contained in:
parent
8125a31fce
commit
c7dd1a0c70
|
@ -26,7 +26,7 @@ function changeCase(txt, type){
|
|||
case 'start':
|
||||
txt = txt.split(" ")
|
||||
for (let i = 0; i < txt.length; i++) {
|
||||
if (txt[i].startsWith("(") || txt[i].startsWith("[") || txt[i].startsWith("{")) {
|
||||
if (bracket = ['(', '{', '['].some(bracket => txt[i].startsWith(bracket))) {
|
||||
txt[i] = txt[i][0] + txt[i][1].toUpperCase() + txt[i].substr(2).toLowerCase()
|
||||
} else {
|
||||
txt[i] = txt[i][0].toUpperCase() + txt[i].substr(1).toLowerCase()
|
||||
|
|
Loading…
Reference in a new issue