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

Function escape

packages/effect/src/unstable/httpapi/internal/html.ts:13–18  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

11
12/** @internal */
13export function escape(str: string): string {
14 return str
15 .replace(/&/g, "&")
16 .replace(/</g, "&lt;")
17 .replace(/>/g, "&gt;")
18}
19
20/** @internal */
21export function escapeAttribute(str: string): string {

Callers 2

escapeAttributeFunction · 0.70
generateColumnsFunction · 0.50

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected