Skip to content

Commit

Permalink
#74 (chore): avoid assignment chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelzhang committed Nov 3, 2021
1 parent 1ba7096 commit 7879eef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ const makeRegex = (pattern, ignorecase) => {
let source = regexCache[pattern]

if (!source) {
regexCache[pattern] = source = REPLACERS.reduce(
source = REPLACERS.reduce(
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
pattern
)
regexCache[pattern] = source
}

return ignorecase
Expand Down

0 comments on commit 7879eef

Please sign in to comment.