@trackunit/shared-utils 0.0.6 → 0.0.8
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 +0 -3
- package/index.esm.js +0 -3
- package/package.json +1 -1
- package/src/addressUtils.d.ts +1 -1
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
|
/**
|
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
|
/**
|
package/package.json
CHANGED
package/src/addressUtils.d.ts
CHANGED
|
@@ -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
|
|
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.
|