Skip to content

A small npm package to validate South African ID numbers.

License

Notifications You must be signed in to change notification settings

jon-peel/za-id.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

za-id.js

A very small javascript package to help validate South African ID numbers.

Installation

npm install za-id

Usage

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'

Prerequisites

This package makes use of moment.js, and lodash.

Typescript

a d.ts file is included in the package

Licence

ISC License. Copyright (c) 2017, Jonathan Peel.

About

A small npm package to validate South African ID numbers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published