@natch-the-storage/heathershaw-platform-types 1.18.6 → 1.18.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,6 +76,7 @@ export declare function formatDate(dateStr?: string | null, toDmy?: boolean): st
76
76
  * @returns The age in years
77
77
  */
78
78
  export declare function getAge(dateOfBirth: string): number;
79
+ export declare function formatAddress(addr: Address): string;
79
80
  export interface Address {
80
81
  street: string;
81
82
  suburb: string;
@@ -245,6 +245,9 @@ export function getAge(dateOfBirth) {
245
245
  age -= 1;
246
246
  return age;
247
247
  }
248
+ export function formatAddress(addr) {
249
+ return `${addr.street}, ${addr.suburb} ${addr.state} ${addr.postcode}`;
250
+ }
248
251
  //#endregion ──────────────────────────────────────────────────────────────────────
249
252
  //#region compound direct ────────────────────────────────────────────────────────────
250
253
  export const CDProductCategoriesIdLabel = cDProductCategoryIdValues.map((v, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.18.6",
3
+ "version": "1.18.7",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",