JSPM

vinidator

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38
  • Score
    100M100P100Q61376F
  • License WTFPL

Package Exports

  • vinidator
  • vinidator/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vinidator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vinidator

Validate a vehicle identification number(VIN)

Install

npm i vinidator

Only breaking change in version 2.0 was the switch to ESM

API

import { validate, validateAndThrowOnInvalid } from 'vinidator'

validate('1HTMMAANX4H670946') // { isValid: true, code: 'SUCCESS', message: 'VIN is valid' }

validateAndThrowOnInvalid('1m2k195c51m017395') // throws