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

Function checkName

packages/effect/src/encoding/Xml.ts:2518–2520  ·  view source on GitHub ↗
(what: string, name: string)

Source from the content-addressed store, hash-verified

2516}
2517
2518const checkName = (what: string, name: string): void => {
2519 if (typeof name !== "string" || !isName(name)) throw invalidEvent(`invalid ${what} ${JSON.stringify(name)}`)
2520}
2521
2522const isWhitespace = (s: string): boolean => {
2523 for (let i = 0; i < s.length; i++) {

Callers 2

checkNameMethod · 0.85
writeMethod · 0.85

Calls 2

isNameFunction · 0.85
invalidEventFunction · 0.85

Tested by

no test coverage detected