Normalise gender values in English, Sinhala, and Tamil, and check them against an NIC.
Import from lanka-validations/gender, or from the package root.
lanka-validations/gender
Maps common spellings and abbreviations to 'male' or 'female'.
'male'
'female'
import { normalizeGender, matchesNicGender } from 'lanka-validations/gender';normalizeGender('F'); // 'female'matchesNicGender('male', '921234567V'); // true Copy
import { normalizeGender, matchesNicGender } from 'lanka-validations/gender';normalizeGender('F'); // 'female'matchesNicGender('male', '921234567V'); // true
Normalise gender values in English, Sinhala, and Tamil, and check them against an NIC.
Import from
lanka-validations/gender, or from the package root.Maps common spellings and abbreviations to
'male'or'female'.Example