UNPKG

@cardog/corgi

Version:

⚡ The fastest and most lightweight open-source VIN decoding library. Fully offline, TypeScript-first, with comprehensive NHTSA VPIC database integration for Node.js, browsers, and Cloudflare Workers.

42 lines (39 loc) 1.62 kB
import { b as DecodeOptions, c as DecodeResult } from './d1-adapter-tXarWrfX.js'; export { u as BODY_STYLE_MAP, v as BaseError, B as BodyStyle, p as BrowserDatabaseAdapter, C as CheckDigitResult, r as CloudflareD1Adapter, o as CoreVINDecoder, p as DatabaseAdapter, i as DatabaseError, f as DecodeError, n as DiagnosticInfo, E as EngineInfo, k as ErrorCategory, j as ErrorCode, l as ErrorSeverity, L as LookupError, M as ModelYearResult, h as PatternError, e as PatternMatch, P as PlantInfo, m as Position, S as StructureError, V as VINComponents, g as ValidationError, d as VehicleInfo, W as WMIResult, s as createD1Adapter, t as decodeVIN } from './d1-adapter-tXarWrfX.js'; import '@cloudflare/workers-types'; /** * Options for VIN decoder initialization */ interface VINDecoderOptions { /** * Path or URL to the database file */ databasePath: string; /** * Default options for VIN decoding */ defaultOptions?: DecodeOptions; } /** * Browser-specific VIN decoder class */ declare class VINDecoder { private adapterFactory; private databasePath; private defaultOptions; /** * Create a new VIN decoder * * @param options - Configuration options */ constructor(options: VINDecoderOptions); /** * Decode a VIN * * @param vin - VIN to decode * @param options - Decode options that override defaults * @returns Decoded VIN information */ decode(vin: string, options?: DecodeOptions): Promise<DecodeResult>; } export { DecodeOptions, DecodeResult, VINDecoder, type VINDecoderOptions, VINDecoder as default };