Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/regexp-helper.ts
blob: ec76c3ad3e78a5e3fd417da2c1aa9b837442da60 (plain)
1
2
3
4
5
export function escape(value: string): string {
  return value.replace(/[^a-zA-Z0-9_]/g, x => {
    return `\\${x}`
  })
}