vin-decoder
vin-decoder copied to clipboard
Validate: Non-NA VINs don't have checksum
Added support for EU and World VINs, to ignore the checksum logic:
https://www.johndcook.com/blog/2019/09/12/vin-check-sum/#:~:text=The%20check%20sum%20is%20in,the%20VIN%2C%20the%209th%20character.
validate(vin,checksum)
now supports checksum='eu'
or 'world'
which will skip over the checksum logic.
Added this to test.js:
it('EU VINs do not have check sum', () => {
validate('YV1MC5851CJ126651','eu').should.equal(true);
});