Repository URL to install this package:
|
Version:
1.1.6 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
function fromDataLayerToThingList(props) {
if (exotic_1.isArray(props.list)) {
return props.list;
}
const street1 = {
type: 'street',
text: props.addressLine1,
};
const street2 = {
type: 'street',
text: props.addressLine2,
};
const region = {
type: 'region',
text: props.city,
};
const country = {
type: 'country',
text: props.country,
};
const locality = {
type: 'locality',
text: props.state,
};
const zip = {
type: 'zip',
text: props.zipCode,
};
const list = [street1, street2, region, country, locality, zip];
return list;
}
exports.fromDataLayerToThingList = fromDataLayerToThingList;
exports.default = fromDataLayerToThingList;
//# sourceMappingURL=fromDataLayerToThingList.js.map