@eventric/mastertour
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -8,3 +8,6 @@ export declare function formatAddress({ addressLine1, city, state, zip, zipcode, country, }: { | ||
country?: string; | ||
}): string | null; | ||
}, { translate, translatePrefix, }?: { | ||
translate?: (arg: string) => string; | ||
translatePrefix?: string; | ||
}): string; | ||
export default formatAddress; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatAddress = void 0; | ||
function formatAddress(_a) { | ||
function formatAddress(_a, _b) { | ||
var addressLine1 = _a.addressLine1, city = _a.city, state = _a.state, zip = _a.zip, zipcode = _a.zipcode, country = _a.country; | ||
var _c = _b === void 0 ? {} : _b, translate = _c.translate, _d = _c.translatePrefix, translatePrefix = _d === void 0 ? "" : _d; | ||
var address = ""; | ||
@@ -26,15 +27,10 @@ if (addressLine1) { | ||
if (country) { | ||
address += "" + country; | ||
address += | ||
country.length === 2 && translate | ||
? translate("" + translatePrefix + country) | ||
: country; | ||
} | ||
if (address.length) { | ||
return address.trim(); | ||
} | ||
else if (address.length) { | ||
return address.trim(); | ||
} | ||
else { | ||
return null; | ||
} | ||
return address.trim(); | ||
} | ||
exports.formatAddress = formatAddress; | ||
exports.default = formatAddress; |
{ | ||
"name": "@eventric/mastertour", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "A library for interacting programmatically with the Master Tour platform", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21526
566