Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Make Swig(A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig) work better.
Swig is an awesome, Django/Jinja-like template engine for node.js.
Thank Paul and previous swig collabs for their hard and excellent work!
Paul Armstrong has stepped down as the primary swig maintainer.
All documentation can be viewed online on the Swiger Website.
npm install swiger
<h1>{{ pagename|title }}</h1>
<ul>
{% for author in authors %}
<li{% if loop.first %} class="first"{% endif %}>{{ author }}</li>
{% endfor %}
</ul>
var swig = require('swig');
var template = swig.compileFile('/absolute/path/to/template.html');
var output = template({
pagename: 'awesome people',
authors: ['Paul', 'Jim', 'Jane']
});
<h1>Awesome People</h1>
<ul>
<li class="first">Paul</li>
<li>Jim</li>
<li>Jane</li>
</ul>
For working example see examples/basic
Swig reads template files and translates them into cached javascript functions. When we later render a template we call the evaluated function, passing a context object as an argument.
MIT
FAQs
Make Swig(A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig) work better.
We found that swiger 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.