Urara-Blog/node_modules/.pnpm-store/v3/files/49/1d1f2df2b94ec20b989093f76bbb77550a638b32b347882c598f6f52431a3a04a23cdbbe8b09be450f6dc97d10846aeb6b3998ea1855ffe071c67f19c2dec6
2022-08-14 01:14:53 +08:00

12 lines
380 B
Text

/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
export function escapeRegExp(str: string): string {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}