Browse Source

Code Cleanup

cleaned up the if condition
pull/8/head
Jera 2 months ago
parent
commit
c7dd1a0c70
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      deemix/utils/index.js

+ 1
- 1
deemix/utils/index.js View File

@ -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…
Cancel
Save