aamva-parser
Version:
Plugin to parse AAMVA Drivers License Data from the PDF417 barcode
16 lines (12 loc) • 425 B
text/typescript
import { FieldMapper, FieldMapping } from '../fieldMapping';
export class VersionThreeFieldMapper implements FieldMapping {
fields: { [key: string]: string } = {};
constructor() {
const fieldMapper = new FieldMapper();
this.fields = { ...fieldMapper.fields }; // Copy fields from FieldMapper
this.fields["firstName"] = "DCT";
}
fieldFor(key: string): string {
return this.fields[key] || key;
}
}