
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
** This module is under development, but you can try it now because it's ready to use already. **
###Render dynamic data to your template easily. this module is superfast and lightweight, works using simple Js functions.
##Example
html [index.html]
<body>
<%name%> // single % for output
<%% if (user){echo(user.name)}%> // double %% for controlling
<%names[1]%>
<%cat.color%>
<%include("somefile.txt")%>
</body>
now node.js
var madex = require("madex");
var data = fs.readFileSync("./index.html");
var obj={
name:"John",
user:{name:"Smith"},
name:["John", "Doe", "Smith"],
cat : {color:"white", name:"mew"}
}
madex.render(data, obj, function(output){
console.log(output);
});
render() takes three params, first one the data read from file, second one an object containing to be rendered datas and third one a callback function with one param, the returning output.
echo() is a function introduced to print outputs, which takes one argument.
files get automatically included ( the last line in html page).
##change the delimeter if you dont like it
madex.delim = "$" //or anything else
Sync version of render() is renderSync()
var output = madex.renderSync(data, obj);
two parameters. first one the data read from file and second one the list to be renderd datas.
FAQs
render dynamic template, fast and easy
We found that madex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.