redact
redact(
code):string
Hides the unit of a postcode, so that a log shows the area but not the building. For a code without a unit, it returns the canonical form unchanged.
Parameters
Section titled “Parameters”A parsed postcode.
Returns
Section titled “Returns”string
The canonical form, with ** in place of the unit.
Example
Section titled “Example”const building = parse('EK-01-A03-FK-01');if (building.ok) { redact(building.value); // 'EK-01-A03-FK-**'}Unofficial. Not made or endorsed by NIPOST.