MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / literalStatus

Function literalStatus

src/ui-server/api/effects.ts:531–538  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

529}
530
531function literalStatus(token: string): number | null {
532 const t = token.trim();
533 if (/^\d{3}$/.test(t)) return Number(t);
534 const named = /^(?:HttpStatus|HTTPStatus|StatusCodes|HttpStatusCode|http|status|Status|HttpStatusCodes|StatusCode|HTTPResponseStatus)\.(\w+)$/.exec(t) ?? /^\.(\w+)$/.exec(t) ?? /^(?:HTTP_|StatusCodes\.)(\w+)$/.exec(t);
535 if (named) return statusOfName(named[1]!);
536 if (/^[A-Z][A-Z_]+$/.test(t)) return statusOfName(t);
537 return null;
538}
539
540/** The word the legend and a box's sub line use for a category. */
541export function categoryWord(category: string): string {

Callers 1

responseStatusFunction · 0.85

Calls 3

NumberInterface · 0.85
statusOfNameFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected