Mistři v programování na #hovnokod

JavaScript #4528

return [{
  address1: this.addressLine1,
  city: this.city,
  postal_code: this.code,
  country: {
    code: this.countryCode,
    name: this.country,
  },
}]
  .map(item => (isEmpty(this.addressLine2) ? item : { ...item, address2: this.addressLine2 }))
  .map(item => (isEmpty(this.province) ? item : { ...item, province: this.province }))
  .find(() => (true))

Anonymous,