use regex test instead of match when only bool needed

This commit is contained in:
Nate Stemen
2018-08-27 14:25:01 -04:00
parent 2dcd2339ed
commit ebea8a8633
21 changed files with 119 additions and 123 deletions
@@ -462,6 +462,6 @@ THEME_LIST = []
do generateThemeList = () ->
files = fs.readdirSync __dirname + '/../../../../public/js/' + PackageVersions.lib('ace')
for file in files
if file.slice(-2) == "js" and file.match(/^theme-/)
if file.slice(-2) == "js" and /^theme-/.test(file)
cleanName = file.slice(0,-3).slice(6)
THEME_LIST.push cleanName