Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/utils / dist / address / fromDataLayerToThingList.js
Size: Mime:
"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