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

Function isNameCode

packages/effect/src/encoding/Xml.ts:1046–1050  ·  view source on GitHub ↗
(c: number)

Source from the content-addressed store, hash-verified

1044 (c >= 0xF900 && c <= 0xFDCF) || (c >= 0xFDF0 && c <= 0xFFFD) || (c >= 0xD800 && c <= 0xDB7F)
1045
1046const isNameCode = (c: number): boolean =>
1047 c < 128 ?
1048 (asciiName[c] & NAME_CHAR) !== 0 :
1049 isNameStartCode(c) || c === 0xB7 || (c >= 0x300 && c <= 0x36F) || (c >= 0x203F && c <= 0x2040) ||
1050 (c >= 0xDC00 && c <= 0xDFFF)
1051
1052// Returns the end of the name starting at `i`, or `i` when there is none
1053const scanName = (s: string, i: number, end: number): number => {

Callers 1

scanNameFunction · 0.85

Calls 1

isNameStartCodeFunction · 0.85

Tested by

no test coverage detected