Skip to content

@alex.garcia/libfec ​

Parse FEC electronic filings (.fec) in Node, Deno and Bun.

ts
import { Filing } from "@alex.garcia/libfec";

using filing = new Filing("1805248.fec");
console.log(filing.formType, filing.filerName);
for (const item of filing.itemizations()) {
  switch (item.type) {
    case "ScheduleA": console.log(item.contribution_amount); break;
    case "Unknown": break; // a record with no typed class
  }
}

Each call to Filing.itemizations or Filing.itemizationRecords is a new pass; Filing.fromId downloads a filing by its ID (pass a proxy in a browser). Importing Record shadows TypeScript's global Record<K, V> in that module: import it under another name (import { Record as FecRecord }) if you need both.

Reading filings ​

Itemizations ​

Covers ​

Shared ​

Labels ​

Errors ​

Columns ​