MCPcopy Create free account
hub / github.com/denoland/std / isKeyChar

Function isKeyChar

http/unstable_structured_fields.ts:472–475  ·  view source on GitHub ↗

Check if character is valid within a key (lcalpha / DIGIT / "_" / "-" / "." / "*")

(c: string)

Source from the content-addressed store, hash-verified

470
471/** Check if character is valid within a key (lcalpha / DIGIT / "_" / "-" / "." / "*") */
472function isKeyChar(c: string): boolean {
473 return isLcalpha(c) || isDigit(c) || c === "_" || c === "-" || c === "." ||
474 c === "*";
475}
476
477// Pre-computed lookup table for tchar (RFC 9110 token characters)
478// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /

Callers 2

parseKeyFunction · 0.85
validateKeyFunction · 0.85

Calls 2

isLcalphaFunction · 0.85
isDigitFunction · 0.85

Tested by

no test coverage detected