@trackunit/shared-utils 0.0.7 → 0.0.9

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/index.cjs.js CHANGED
@@ -165,9 +165,6 @@ const convertYardsToMeters = (value) => {
165
165
  * @example formatAddress({ streetAddress: "Street 1", zipCode: "12345", city: "City", country: "Country" }) // "Street 1, 12345 City, Country"
166
166
  */
167
167
  const formatAddress = (address) => {
168
- if (!address) {
169
- return null;
170
- }
171
168
  return [address.streetAddress, address.zipCode, address.city, address.country].filter(s => s).join(", ");
172
169
  };
173
170
  /**
@@ -272,8 +269,8 @@ const hourIntervals = [
272
269
  ];
273
270
 
274
271
  const size = {
275
- SMALL: "small",
276
272
  MEDIUM: "medium",
273
+ SMALL: "small",
277
274
  LARGE: "large",
278
275
  };
279
276
 
package/index.esm.js CHANGED
@@ -161,9 +161,6 @@ const convertYardsToMeters = (value) => {
161
161
  * @example formatAddress({ streetAddress: "Street 1", zipCode: "12345", city: "City", country: "Country" }) // "Street 1, 12345 City, Country"
162
162
  */
163
163
  const formatAddress = (address) => {
164
- if (!address) {
165
- return null;
166
- }
167
164
  return [address.streetAddress, address.zipCode, address.city, address.country].filter(s => s).join(", ");
168
165
  };
169
166
  /**
@@ -268,8 +265,8 @@ const hourIntervals = [
268
265
  ];
269
266
 
270
267
  const size = {
271
- SMALL: "small",
272
268
  MEDIUM: "medium",
269
+ SMALL: "small",
273
270
  LARGE: "large",
274
271
  };
275
272
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/shared-utils",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -20,7 +20,7 @@ interface Coordinates {
20
20
  * @returns {string} The formatted address.
21
21
  * @example formatAddress({ streetAddress: "Street 1", zipCode: "12345", city: "City", country: "Country" }) // "Street 1, 12345 City, Country"
22
22
  */
23
- export declare const formatAddress: (address: Address | null | undefined) => string | null;
23
+ export declare const formatAddress: (address: Address) => string;
24
24
  /**
25
25
  * @description Formats coordinates into a single string.
26
26
  * @param coordinates The coordinates to format.
@@ -1,6 +1,6 @@
1
1
  export declare const size: {
2
- SMALL: "small";
3
- MEDIUM: "medium";
4
- LARGE: "large";
2
+ readonly MEDIUM: "medium";
3
+ readonly SMALL: "small";
4
+ readonly LARGE: "large";
5
5
  };
6
- export type Size = typeof size[keyof typeof size];
6
+ export type Size = (typeof size)[keyof typeof size];