From 62f66c0c013a4c56bfed7830d62b2112c84969f7 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 2 Aug 2017 11:20:02 +0300 Subject: [PATCH] refactor(util) getRegExp --- common/util.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/util.js b/common/util.js index f44c249a..943428f8 100644 --- a/common/util.js +++ b/common/util.js @@ -40,9 +40,7 @@ module.exports.getRegExp = (wildcard) => { .replace('*', '.*') .replace('?', '.?') + '$'; // search to end of line - const regExp = new RegExp(escaped); - - return regExp; + return RegExp(escaped); }; module.exports.exec = exec;