@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.
- package/build/validators.d.ts +1 -0
- package/build/validators.js +3 -0
- package/package.json +1 -1
package/build/validators.d.ts
CHANGED
|
@@ -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;
|
package/build/validators.js
CHANGED
|
@@ -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) => {
|