Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vit-registration-number

Ever wanted to quickly validate and read data off a registration number in VIT? Then this package is for you. Here's a simple usage.

Usage

# install the package
npm install @acmvit/vit-registration-number

Using in Code

const RegistrationNumber = require("@acmvit/vit-registration-number")
const someNumber = new RegistrationNumber("19BCE2669")

const year = someNumber.getYear()
// => 19

const branch = someNumber.getBranch();
// => BCE

const index = someNumber.getIndex();
// => 2669

No need to worry about validation Strict type checking for all sections of the registration number. Will throw an error if the registration number is malformed, so that it's easy to check. Always wrap inside a try-catch block when validating numbers.

About

a npm package to easily work with registration numbers

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages