summaryrefslogtreecommitdiff
path: root/south-african-id-parser.d.ts
blob: b401e7bd53782a5caf84cf9f7aa6a20c6c9da55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export function parse(idNumber: string): {
    /**
     * - true
     */
    isValid: boolean;
    /**
     * - The date of birth from the ID number.
     */
    dateOfBirth: Date;
    /**
     * - The sex from the ID number - true if male, false if female.
     */
    isMale: boolean;
    /**
     * - The sex from the ID number - true if female, false if male.
     */
    isFemale: boolean;
    /**
     * - Citizenship status from the ID
     * number, true if it indicates South African citizenship.
     */
    isSouthAfricanCitizen: boolean;
} | {
    /**
     * - false
     */
    isValid: boolean;
};
export function validate(idNumber: string): boolean;
export function parseDateOfBirth(idNumber: string): Date;
export function parseIsMale(idNumber: string): boolean;
export function parseIsFemale(idNumber: string): boolean;
export function parseIsSouthAfricanCitizen(idNumber: string): boolean;
//# sourceMappingURL=south-african-id-parser.d.ts.map