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

Function escapeToken

packages/effect/src/JsonPointer.ts:42–44  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

40 * @since 4.0.0
41 */
42export function escapeToken(token: string): string {
43 return token.replace(/~/g, "~0").replace(/\//g, "~1")
44}
45
46/**
47 * Decodes a JSON Pointer reference token according to RFC 6901 escaping rules.

Callers 4

getLoopFunction · 0.90
finalizeJsonSchemaFunction · 0.90
recurFunction · 0.90

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected