sa_id_validator
v1.0.2
Published
This Package uses the Luhn's algorithm to verify if the provided ID number is a valid South African ID number.
Downloads
1
Readme
SA ID Validator
SA ID Validator is a Node.js package that implements the Luhn algorithm to validate South African ID numbers.
Installation
You can install the SA ID Validator package via npm. Make sure you have Node.js installed on your system before proceeding.
npm install sa-id-validator
Using CommonJS syntax
const isValidSouthAfricanID = require('sa-id-validator');
Using ES module syntax
import isValidSouthAfricanID from 'sa-id-validator';
const id = '92061***********';
console.log(isValidSouthAfricanID(id)); // Output:
{
isValid: true,
dateOfBirth: '1992/06/17',
gender: 'Male',
citizenship: 'South African'
}