From 41b16b7561c392abbeab2a67d715c42ff5d5ff8a Mon Sep 17 00:00:00 2001 From: hotoo Date: Thu, 21 May 2015 08:34:36 +0800 Subject: [PATCH] optimize use regexp without caught group --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e6a30fa..4cfb385 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ module.exports = function (app, options) { var names = fs.readdirSync(localeDir); for (var i = 0; i < names.length; i++) { var name = names[i]; - if (!/\.(js|json|properties)$/.test(name)) { + if (!/\.(?:js|json|properties)$/.test(name)) { continue; } var filepath = path.join(localeDir, name);