How to Create a JS Template Engine
at hackernoon.com▼1 up and 0 down, posted by
1 up and 0 down, posted by
> This will be doubly so in most ad networks, if you happen to be targeting that context. Sorry, I don't understand what you mean by this. Can you clarify or something?
You're creating a `new Function(...)`, this and `eval` are blocked by static analysis tooling, ad network linting applications, and other code linting tools such as eslint[1]. const compile = (template) => { return new Function("data", "return " + compileToString(template)) } [1] https://eslint.org/docs/rules/no-new-func