parent
parent(
code):Postcode|null
Returns the postcode one segment less precise, such as the area of a building.
Parameters
Section titled “Parameters”A parsed postcode.
Returns
Section titled “Returns”Postcode | null
The parent postcode, or null for a state code.
Example
Section titled “Example”const building = parse('EK-01-A03-FK-01');if (building.ok) { parent(building.value)?.canonical; // 'EK-01-A03-FK'}Unofficial. Not made or endorsed by NIPOST.