@alex.garcia/libfec / electionCodeLabel
Function: electionCodeLabel()
electionCodeLabel(
code):string|null
Defined in: generated/labels.ts:31
The election type for a cover record's election code (P2026 → "Primary"), from the code's first letter.
Letters per the FEC e-filing format specification, "Election Code (A.K.A. Primary/General Indicator or PGI)": P Primary, G General, O Other, C Convention, R Runoff, S Special, E Recount, each followed by the election year (FEC_Format_v8.4.pdf p11). Unknown letters return None.
Returns null for null, undefined and unknown codes. Mirrors Rust's fec_parser::covers::election_code_label.
Parameters
code
string | null | undefined
Returns
string | null