Folks,
What will be a good way to expose any helper function to the EJS view engine? For an example, if I want to write a function where it will take the following:
function generate_link (pName, pUrl) {}
I want this function to produce the following HTML:
<a href="<pUrl>"><pName></a>
Where should I put function or package of functions like this so that in my index.ejs view for an example where I can use something like:
<div>
<%- generate_link('test', '/test'); %>
<div>
Any help will be appreciated. Thanks.