Tests for the inward code section of a postcode
Tests for the outward code section of a postcode
Test for a valid postcode embedded in text
Tests for a valid postcode
Tests for the unit section of a postcode
Attempts to fix and clean a postcode. Specifically:
If the postcode cannot be coerced into a valid format, the original string is returned
Detects a "valid" postcode
Searches a body of text for postcode matches
Returns an empty array if no match
Returns a ValidPostcode or InvalidPostcode object from a postcode string
Replaces postcodes in a body of text with a string
By default the replacement string is empty string ""
Returns a correctly formatted area given a postcode
Returns null if invalid postcode
Returns a correctly formatted district given a postcode
Returns null if invalid postcode
Returns a correctly formatted incode given a postcode
Returns null if invalid postcode
Returns a normalised postcode string (i.e. uppercased and properly spaced)
Returns null if invalid postcode
Returns a correctly formatted outcode given a postcode
Returns null if invalid postcode
Returns a correctly formatted sector given a postcode
Returns null if invalid postcode
Returns a correctly formatted subdistrict given a postcode
Returns null if no subdistrict is available on valid postcode Returns null if invalid postcode
Returns a correctly formatted unit given a postcode
Returns null if invalid postcode
Returns true if string is a valid outcode
Tests for the area section of a postcode