
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
templating-engine
Advanced tools
An alternative to ejs.
npm i nodetmp
import { compile } from "nodetmp";
const output = compile(pathOfInputFile, dataObje);
console.log(output.output); // compiled output
output.write(pathForOutput); // write file at given location
{:if condtion}
<!-- if body -->
{:else}
<!-- else body -->
{/if}
{:each array as item,id}
<!-- body -->
{/each}
import {html_renderer} from "nodetmp";
app.use(html_renderer);
then we can use "res.html" function to parse html file.
// first argument -> path of html file relative to root folder
// second argument -> data which need to be passed
app.get("/", (req, res) => res.html("/index.html", {count:0}))
// index.html
<h1> {count} </h1>
there is also a "include" function available to include another html file.
// counter.html
<h1> {count} </h1>
// index.html
// one argument -> path relative to root folder
<div>
{include("/counter.html")}
</div>
MIT
FAQs
An alternative to ejs
We found that templating-engine 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.