Lazy VIN Library
A very quick and very dirty library for getting random VINs.
StackBlitz Demo App Using the Library
Usage
Importing library
Install via yarn/npmyarn add lazy-vin-lib
You can import the generated bundle to use the whole library generated by this starter:
import LazyVin from 'lazy-vin-lib'
class MyClass {
private lazyVin;
constructor() {
this.lazyVin = new LazyVin();
}
someSlightlyBetterMethod(): string {
return this.lazyVin.getRandomValidVin();
}
someMethod(): string {
return this.lazyVin.getRandomCleanVin();
}
someRiskierMethod(): string {
return this.lazyVin.getRandomDirtyVin();
}
}
Methods
This library exposes the following methods:getRandomValidVin()
Returns a quick and dirty 'random' VIN, complete with a North American valid Check Digit/Checkdigit).getRandomDirtyVin()
A simple, quick and dirty 'random' VIN. It is not guaranteed to be valid. ...did I mention it's quick and dirty?getRandomCleanVin()
A simple, quick and 'clean' 'random' VIN. It is not guaranteed to be valid. ...did I mention it's quick and clean?What makes the return value more 'clean' is a randomly generated six digit unique identifier at the end of a given VIN. The aim is to lower the chances of getting a repeat VIN--not eliminate it.