optimize use regexp without caught group
This commit is contained in:
2
index.js
2
index.js
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user