Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 579 Bytes

README.md

File metadata and controls

30 lines (17 loc) · 579 Bytes

nric

Utility to validate or generate Singapore NRIC and FIN numbers with valid check digit.

Install

$ npm install nric

Usage

const nric = require('nric');

nric.validate('S1234567A'); //false

nric.validate('S9470855I'); //true

nric.validate('T7123769E'); //true

nric.generateNRIC(); //e.g. S9470855I

nric.generateFIN(); //e.g. G2943157X

License

MIT