@natch-the-storage/heathershaw-platform-types 1.18.15 → 1.18.16

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.
@@ -109,6 +109,8 @@ export declare function formatAddress(addr: Address): string;
109
109
  * Formats an address object into a human readable format
110
110
  */
111
111
  export declare function formatOrderId(o: Pick<Order, 'id' | 'type'>): string;
112
+ /** Formats a number into a price string */
113
+ export declare function formatPrice(n: number): string;
112
114
  export interface Address {
113
115
  street: string;
114
116
  suburb: string;
@@ -299,6 +299,10 @@ export function formatAddress(addr) {
299
299
  export function formatOrderId(o) {
300
300
  return `#${o.id}-${o.type ?? 'HS'}`;
301
301
  }
302
+ /** Formats a number into a price string */
303
+ export function formatPrice(n) {
304
+ return `$${n.toFixed(2)}`;
305
+ }
302
306
  //#endregion ──────────────────────────────────────────────────────────────────────
303
307
  //#region compound direct ────────────────────────────────────────────────────────────
304
308
  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.15",
3
+ "version": "1.18.16",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",