sa_id_validator

1.0.2 • Public • Published

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'
}

Readme

Keywords

none

Package Sidebar

Install

npm i sa_id_validator

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

2.58 kB

Total Files

4

Last publish

Collaborators

  • gatsheni