Skip to content

Commit

Permalink
fix: Match function in js-client (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushjain17 committed Jul 17, 2024
1 parent 6dd17f8 commit 5d3b2aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/js/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions clients/js/src/utils/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const isJPVersionLesserEqual = function (version_a: string, version_b: st
}

export const matchRegex = function (text: string, pattern: string, flag?: string): boolean {
const flagStr = flag !== undefined && flag !== "" ? `/${flag}` : "";
const re = new RegExp(pattern + flagStr);
const re = new RegExp(pattern, flag);
return re.test(text);
}

0 comments on commit 5d3b2aa

Please sign in to comment.