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

Function lookupNamespace

packages/effect/src/encoding/Xml.ts:723–729  ·  view source on GitHub ↗
(namespaces: Namespaces, prefix: string)

Source from the content-addressed store, hash-verified

721}
722
723const lookupNamespace = (namespaces: Namespaces, prefix: string): string | undefined => {
724 if (prefix === "xml") return xmlNamespace
725 for (let scope: Namespaces | undefined = namespaces; scope !== undefined; scope = scope.parent) {
726 if (Object.hasOwn(scope.declarations, prefix)) return scope.declarations[prefix]
727 }
728 return undefined
729}
730
731/**
732 * Creates a channel that writes events as XML text.

Callers 2

attributeFunction · 0.85
resolveQNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected