I have a function for template literals and when using it like this I want to get the variable name which is here 'count' as string inside my html template string function, is there any way?
const count = 0;
html`<h3>Count: ${count}</h3>`;
Get 'count' as string here, or even the whole unprocessed string like "<h3>Count: ${count}</h3>
"
export function html(literals, ...vars) {
// get function and variable names like 'count' here
console.log(literals.raw);
console.log(...vars);
}