Last active
December 6, 2024 17:33
-
-
Save therealparmesh/c6cbb7a571811c09e325c918e62d5c53 to your computer and use it in GitHub Desktop.
html template
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
export function html(strings: TemplateStringsArray, ...expressions: string[]) { | |
let result = ''; | |
for (let i = 0; i < strings.length; i++) { | |
result += strings[i]; | |
if (i < expressions.length) { | |
result += expressions[i]; | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment