Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • checkBuildingRange(building_name: string): void | BuildingRangeMatch
  • Detects whether a building name contains a range

    Parameters

    • building_name: string

    Returns void | BuildingRangeMatch

  • combinePremise(elems: AddressElements, address: Address, premise: string, number: string, unit: string): FormattedPremise
  • Merges premise elements ordered by precedence into a formatted address

    Parameters

    • elems: AddressElements
    • address: Address
    • premise: string
    • number: string
    • unit: string

    Returns FormattedPremise

  • formatElem(e: string): string
  • Formats an address element

    • If a single letter element, suffix a comma
    • Otherwise return address element

    Parameters

    • e: string

    Returns string

  • hasUnitPrefix(e: string): boolean
  • Test for whether a string begins with a unit prefix

    E.g. Back of 10A => true

    Parameters

    • e: string

    Returns boolean

  • isSingleCharacter(c: string): boolean
  • Returns true if string matches rule (iii) of exception rule (above)

    Parameters

    • c: string

    Returns boolean

  • lastElem(a: AddressElements): string
  • Non-desctructively return last elem

    Parameters

    • a: AddressElements

    Returns string

  • nameException(n: string): boolean
  • Exception Rule indicators: i) First and last characters of the Building Name are numeric (eg ‘1to1’ or ’100:1’) ii) First and penultimate characters are numeric, last character is alphabetic (eg 12A’) iii) Building Name has only one character (eg ‘A’)

    Parameters

    • n: string

    Returns boolean

  • premiseLocalities(address: Address): AddressElements
  • Returns an array of localities according to precedent recorded in localityElements

    Parameters

    Returns AddressElements