Last active
July 14, 2018 10:12
-
-
Save leny/e290f6b12f6c17bf1b4757451e45b7bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getReadableAddress = ({street, number, zip, city, country}) => { | |
if (street && number && zip) { | |
return [ | |
`${street} ${number}`, | |
`${zip} ${city}`, | |
country, | |
].join("\n"); | |
} | |
return `${city} (${country})`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment