A very small javascript package to help validate South African ID numbers.
npm install za-id
var valid = validateIdNumber('000000000000'); //boolean value
or
var details = {};
validateIdNumber('000000000000', details);
console.log(details.dateOfBirth); // Date value
console.log(details.SouthAfrican); // boolean value
console.log(details.Gender); // 'Male' | 'Female'
This package makes use of moment.js, and lodash.
a d.ts
file is included in the package
ISC License. Copyright (c) 2017, Jonathan Peel.