UNPKG

smartystreets-javascript-sdk

Version:
2 lines (1 loc) 377 B
"use strict";var t,o;exports.__require=function(){return o?t:(o=1,t=class{constructor(t){this.lookup=t,this.data={}}add(t,o){this.lookupFieldIsPopulated(o)&&(this.data[t]=this.formatData(this.lookup[o]))}addCustomParameter(t,o){this.data[t]=o}formatData(t){return Array.isArray(t)?t.join(";"):t}lookupFieldIsPopulated(t){return""!==this.lookup[t]&&void 0!==this.lookup[t]}})};