Created
September 7, 2016 07:05
-
-
Save alexandrebodin/3128f9636045f439deb0c04192852ba9 to your computer and use it in GitHub Desktop.
This file contains 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 phoneToString = phone => `${phone.prefix} ${phone.number}`; | |
const phones = [ | |
{ | |
prefix: '+33', | |
number: '102219123', | |
}, | |
{ | |
prefix: '+33', | |
number: '1111111111', | |
}, | |
]; | |
const contact = { | |
coordinates: { | |
phones, | |
}, | |
}; | |
R.pipe( | |
R.pathOr([], ['coordinates', 'phones']), | |
R.map(phoneToString), | |
R.join(' / ') | |
) | |
(contact); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment