Utils
import moment from 'moment' export const hasExpired = (expiresIn?: string ): boolean => { return expiresIn === undefined || moment (). isAfter ( expiresIn ) } export class CountryStateUtils { static isValidPostcode = (postcode: string ): boolean => { const numericPostcode = Number (postcode) return ( postcode. length === 4 && ! isNaN ( numericPostcode ) && numericPostcode > 0 && Number . isInteger ( numericPostcode ) ) } static isValidNSWPostcode = (postcode: string ): boolean => { if (! CountryStateUtils . isValidPostcode (postcode)) { return false } const numericPostcode = Number (postcode) return ( numericPostcode >= 1000 && numericPostcode <= 2999 ) || [ 3586 , 3644 , 3707 ]. includes ( numericPostcode ) } } export const isAustralianMobileNumber = (mobile: string ): boolean => { const newMobile = mobile. replace ( /\s...