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