Last active
October 11, 2021 08:15
-
-
Save frivolta/15a01aee95428970a5af168ed17a501e 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 addPrefix = (price) => "$" + String(price); //$ 40.00 | |
const discountWithPrefix = compose( | |
addPrefix, | |
normalizePrice, | |
divide100, | |
multiply20 | |
); | |
discountWithPrefix(200.0); // '$40.00' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment