Skip to content

Commit

Permalink
fix(normalise): pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmoura committed Apr 13, 2023
1 parent 188f19a commit e1e9e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utilities/src/match/normalise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function normalise(matcher: Matcher): Predicate<string> {
const patterns = ([] as (string | RegExp)[])
.concat(matcher)
.map(pattern => isString(pattern)
? new RegExp(pattern)
? new RegExp(`^${pattern}$`)
: pattern
);

Expand Down

0 comments on commit e1e9e5b

Please sign in to comment.