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

Method decode

packages/effect/src/encoding/Xml.ts:2310–2319  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

2308 }
2309
2310 private decode(bytes: Uint8Array): void {
2311 let text: string
2312 try {
2313 text = utf8Decoder.decode(bytes)
2314 } catch {
2315 this.parser.feed(utf8Decoder.decode(bytes.subarray(0, validUtf8(bytes))), true)
2316 throw this.parser.error("Syntax", "invalid UTF-8", this.parser.received)
2317 }
2318 this.parser.feed(text)
2319 }
2320}
2321
2322interface MutableElement extends Element {

Callers 15

pushMethod · 0.95
githubClientFunction · 0.45
parseSpecFunction · 0.45
decodeEffectFunction · 0.45
decodeWideRowsFunction · 0.45
decodeRowsEffectFunction · 0.45
decodeArrayEffectFunction · 0.45
decodeNumericEffectFunction · 0.45
PgAuth.test.tsFile · 0.45
PgTypes.test.tsFile · 0.45
PgProtocol.test.tsFile · 0.45
authenticateFunction · 0.45

Calls 3

validUtf8Function · 0.85
feedMethod · 0.65
errorMethod · 0.65

Tested by 15

githubClientFunction · 0.36
makeConnectorFunction · 0.36
bodyJsonFunction · 0.36
bodyJsonFunction · 0.36
requestBodyFunction · 0.36
bodyParamsFunction · 0.36
textFunction · 0.36
readFunction · 0.36
writeFunction · 0.36
textFunction · 0.36
sendHelloDenoFunction · 0.36
bytesFunction · 0.36