What's New
TypeScript Support Improvements
- Export
ParsedLicense type for typing parsed license objects
- Export all enums (
Gender, EyeColor, HairColor, IssuingCountry, Truncation, NameSuffix)
Package Improvements
- Add
homepage and bugs links to npm page
- Add
sideEffects: false for better tree-shaking
- Improve npm discoverability with additional keywords
- Update minimum Node.js version to 20 (current LTS)
Documentation
- Add TypeScript usage examples to README
- Add Requirements section
Usage
import { Parse, ParsedLicense, Gender, EyeColor } from "aamva-parser";
const license: ParsedLicense = Parse(barcodeData);
if (license.gender === Gender.Male) {
console.log("Male");
}
Installation
npm install aamva-parser