lazy-vin-lib

[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) <!-- [![Greenkeeper badge](https://badges.greenkeeper.io/alexjoverm/typescript-library-starter.svg)](https://greenkeeper.io/) [![

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
lazy-vin-lib
0.0.64 years ago5 years agoMinified + gzip package size for lazy-vin-lib in KB

Readme

Lazy VIN Library
styled with prettier
A very quick and very dirty library for getting random VINs.
StackBlitz Demo App Using the Library

Usage

Importing library

Install via yarn/npm
yarn 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.