optimize use regexp without caught group

master
hotoo 2015-05-21 08:34:36 +08:00
parent c0a48cd9a3
commit 41b16b7561
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ module.exports = function (app, options) {
var names = fs.readdirSync(localeDir); var names = fs.readdirSync(localeDir);
for (var i = 0; i < names.length; i++) { for (var i = 0; i < names.length; i++) {
var name = names[i]; var name = names[i];
if (!/\.(js|json|properties)$/.test(name)) { if (!/\.(?:js|json|properties)$/.test(name)) {
continue; continue;
} }
var filepath = path.join(localeDir, name); var filepath = path.join(localeDir, name);