Returns the sex marker encoded in input, or null if the spec does not encode sex or the input fails validation.
input
null
Returns the document's literal marker — "M", "F", or "X" for non-physical-person entities (e.g. Argentine PJ CUIT prefixes 30/33/34).
"M"
"F"
"X"
30/33/34
Document type. Must support "sex" (see supports).
"sex"
supports
Raw user input; will be normalized and validated first.
A Sex on success, null otherwise.
Sex
import { extractSex } from "nationid/extract";extractSex("MX_CURP", "GOMC850315HDFRRR07"); // "M"extractSex("AR_CUIT", "30709653543"); // "X" (persona jurídica) Copy
import { extractSex } from "nationid/extract";extractSex("MX_CURP", "GOMC850315HDFRRR07"); // "M"extractSex("AR_CUIT", "30709653543"); // "X" (persona jurídica)
Returns the sex marker encoded in
input, ornullif the spec does not encode sex or the input fails validation.Returns the document's literal marker —
"M","F", or"X"for non-physical-person entities (e.g. Argentine PJ CUIT prefixes30/33/34).