diff --git a/src/main.ts b/src/main.ts index 815dc98..239d3fe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -8,4 +8,6 @@ * * SyntaxError: Invalid regular expression: : Invalid escape */ -export const escape: (literal: string) => string = literal => literal.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') +export function escape (literal: string): string { + return literal.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') +}