-
-
Save starakaj/7b3c1fcd1a3e0d15690c824d595f3485 to your computer and use it in GitHub Desktop.
Babel templates so nice
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 makeAddFive = template(` | |
var %%newVariable%% = %%oldVariable%% + 5; | |
`); | |
const addFiveStatement = makeAddFive({ | |
newVariable: "x", | |
oldVariable: "y" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment