cnp-decoder
Version:
A function that decodes a romanian CNP and returns a object containing informations about the person it belongs to
19 lines (18 loc) • 422 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGender = void 0;
const getGender = cnp => {
switch (cnp.split('')[0]) {
case '1':
case '3':
case '5':
case '7':
return 'Male';
case '2':
case '4':
case '6':
case '8':
return 'Female';
}
};
exports.getGender = getGender;