mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
chore: lint
This commit is contained in:
parent
bd7dfd0c28
commit
d0e5fc0cbd
4 changed files with 26 additions and 23 deletions
|
|
@ -15,10 +15,10 @@ module.exports.escapeRegExp = (str) => {
|
|||
* get regexp from wild card
|
||||
*/
|
||||
module.exports.getRegExp = (wildcard) => {
|
||||
const escaped = '^' + wildcard // search from start of line
|
||||
const escaped = `^${wildcard // search from start of line
|
||||
.replace(/\./g, '\\.')
|
||||
.replace(/\*/g, '.*')
|
||||
.replace('?', '.?') + '$'; // search to end of line
|
||||
.replace('?', '.?')}$`; // search to end of line
|
||||
|
||||
return RegExp(escaped);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue