DEPRECATION NOTICE
This module is no longer under active development.
NOTE: breaking changes were introduced while refactoring vindec.
I am in the process of moving this repo's functionality to the original vindec repo and decoupling this plugin architecture. Older versions of vindec (<=2.1.3) should still work.
vindec-nhtsa
A Vindec plugin that returns a vin object with a property called fetch that is a pending Promise that, when settled, fetches the NHTSA data from a vehicle's manufacture year and VIN.
Install via npm (or yarn)
Returns original, vindec object (mutated)
When the decode method is called on a VIN, it returns the standard vindec decoded object, but it also includes the URL of the API and the response data. I may still sanitize some of the data returned, but I may leave it as-is. Any suggestions are greatly appreciated.
// create and mutateconst vindec = ;const nhtsa = vindec; // decode and validatelet vin = nhtsa; // settle pending promisevin;