Repository URL to install this package:
|
Version:
1.1.3 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
function fromAddressToString(shippingAddress) {
if (exotic_1.isObjWithKeys(shippingAddress)) {
const { firstName, lastName, addressLine1, addressLine2, city, state, country, postalCode, phoneNumber, telephone, email, } = shippingAddress;
const addressString = `${firstName},${lastName},${addressLine1},${addressLine2},${city},${state},${country},${postalCode},
${telephone ? telephone : phoneNumber},${email}`;
return addressString;
}
else {
if (process.env.NODE_ENV !== 'production') {
console.warn('[utils] non object with keys given to fromAddressToString');
}
return '';
}
}
exports.fromAddressToString = fromAddressToString;
exports.default = fromAddressToString;
//# sourceMappingURL=fromAddressToString.js.map