MCPcopy Create free account
hub / github.com/Effect-TS/effect / escape

Function escape

packages/effect/src/RegExp.ts:78–78  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

76 * @since 2.0.0
77 */
78export const escape = (string: string): string => string.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&")

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected