I'm getting string representation for es6 function like this
"return (...args) => {↵ console.log('HIGHLIGHTLOADER', args);↵ };"
from this string, I need to create a function
const func = (...args) => {
console.log('HIGHLIGHTLOADER', args);
}
Without using eval How can i parse this string?.
evalis for. And what you're asking is horribly unsafe.