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

Method checkAttributes

packages/effect/src/encoding/Xml.ts:2558–2566  ·  view source on GitHub ↗
(attributes: Readonly<Record<string, string>>)

Source from the content-addressed store, hash-verified

2556
2557 // Checks attributes one by one, in order, after a batched check has failed
2558 private checkAttributes(attributes: Readonly<Record<string, string>>): void {
2559 for (const name in attributes) {
2560 if (!Object.hasOwn(attributes, name)) continue
2561 const value = attributes[name]
2562 this.checkName("attribute name", name)
2563 if (typeof value !== "string") throw invalidEvent(`attribute ${name} must be a string`)
2564 checkChars(`attribute ${name}`, value)
2565 }
2566 }
2567
2568 push(event: Event): void {
2569 const text = this.write(event)

Callers 1

writeMethod · 0.95

Calls 3

checkNameMethod · 0.95
invalidEventFunction · 0.85
checkCharsFunction · 0.85

Tested by

no test coverage detected