Refactor server side notifications (#2327)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2022-10-26 17:24:39 +07:00
committed by GitHub
parent 70e00dbb5f
commit 3a8d1e2bcb
58 changed files with 539 additions and 400 deletions
@@ -0,0 +1,7 @@
function escapeRegExp (str: string): string {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
}
export function replaceAll (str: string, find: string, replace: string): string {
return str.replace(new RegExp(escapeRegExp(find), 'g'), replace)
}