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

Method intern

packages/effect/src/encoding/Xml.ts:1927–1934  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

1925 // Returns the shared namespace for `uri`. Finding it costs the length of
1926 // `uri`, which is part of the declaration being read.
1927 private intern(uri: string): Namespace {
1928 let namespace = this.namespacesByName.get(uri)
1929 if (namespace === undefined) {
1930 namespace = { uri: copyString(uri) }
1931 this.namespacesByName.set(namespace.uri, namespace)
1932 }
1933 return namespace
1934 }
1935
1936 // Undoes the binding changes made since `undo` was the length of the log
1937 private restore(undo: number): void {

Callers 1

openScopeMethod · 0.95

Calls 3

copyStringFunction · 0.85
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected