@alex.garcia/libfec / Record
Class: Record
Defined in: record.ts:57
One raw record of a filing: the cover line (Filing.coverRecord) or a record after it (Filing.itemizationRecords): an itemization (SA11AI, SB17, …), a text record or a summary record. Mirrors Python's libfec.Record.
All data is in own enumerable properties, so { ...record } and structuredClone(record) give plain objects (without the methods and the lazy itemization).
Properties
rowType
readonlyrowType:string
Defined in: record.ts:63
The row type as filed, field 0: "SA11AI", "SB17", "TEXT". A TEXT record's first column is named rec_type, not form_type, so test rowType rather than values.form_type.
line
readonlyline:number
Defined in: record.ts:65
The record's 1-based physical line in the file.
values
readonlyvalues:RecordValues
Defined in: record.ts:67
The record's values by FEC column name, in column order; see Value.
fields
readonlyfields: readonlystring[]
Defined in: record.ts:69
Every raw field of the record, in file order.
Accessors
itemization
Get Signature
get itemization():
Itemization|null
Defined in: record.ts:101
The record as a typed itemization (ScheduleA, …), or null for a record that is not one or whose schedule has no type yet. Typed anew on every access (a new object each time); Filing.itemizations is the fast path for typing every record.
Values are the parser's: an unparseable amount reads 0 (or null where the field is optional) and an invalid date null, the same as Python's typed classes. values keeps the raw text of such fields.
Returns
Itemization | null
extraFields
Get Signature
get extraFields():
string[]
Defined in: record.ts:113
Fields past the last mapped column; [] unless one of them is non-empty (trailing empty fields are common and meaningless).
Returns
string[]
Methods
get()
get(
column):Value|undefined
Defined in: record.ts:119
The value of column, or undefined if the record has no such column.
Parameters
column
string
Returns
Value | undefined
toJSON()
toJSON():
RecordJSON
Defined in: record.ts:124
{ rowType, line, values } (fields is left out).