KOSASIH / Mellobank

Bad usage of RegExp#exec and String#match JS-D007
Performance
Major
2 years ago2 years old
Prefer RegExp#test() over RegExp#exec()
119    const pathElements = [];
120    let match;
121
122    while ((match = pathRegex.exec(path))) {123      const p = match[0].replace(/[{}?*;]/g, "");
124      if (pathElements.includes(p)) {
125        results.push(