New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

universal-vin-decoder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universal-vin-decoder

An NPM package to decode Vehicle Identification Numbers (VIN)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Universal VIN Decoder

universal-vin-decoder provides utility functions for validating and parsing Vehicle Identification Numbers (VIN).

  • Decode VINs from more than 1,500 manufacturers
  • Extract region, country, car model's year and manufacturer
  • Validate provided VIN

Usage

import { decodeVIN, splitVIN, validateVIN } from 'universal-vin-decoder';

validateVIN('VR7EFYHT2PN547380'); //=> { isValid: true }
validateVIN('hello there!'); //=> { isValid: false, error: 'VIN must be 17 characters long' }
validateVIN(null); //=> { isValid: false, error: 'VIN must be a string' }

splitVIN('NMTK33BXX0R132738');
//=> {
//     wmi: 'NMT',       World Manufacturer Identifier
//     vds: 'K33BXX',    Vehicle Descriptor Section
//     vis: '0R132738',  Vehicle Identifier Section
//     modelYear: '0',   Model Year
//   }

decodeVIN('VR7EFYHT2PN547380');
//=> {
//     vin: 'VR7EFYHT2PN547380',
//     isValid: true,
//     info: {
//       region: 'Europe',
//       country: 'France',
//       modelYear: '2023',
//       manufacturer: 'Citroën'
//     }
//   }

Installation

Use the package manager of your choice to install it throug the NPM registry. If you use npm run:

npm install universal-vin-decoder

Keywords

vin-decoder

FAQs

Package last updated on 28 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts