
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@rhinostone/swig-jinja2
Advanced tools
Jinja2-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.
Jinja2-syntax frontend for the @rhinostone/swig-core template engine. Part of the multi-flavor architecture introduced in 2.0.0 — see ROADMAP.md for the release narrative.
npm install @rhinostone/swig-jinja2
This pulls in @rhinostone/swig-core as a peer dependency, pinned to the matching version. Frontends and the core release in lockstep — do not mix versions.
var swig = require('@rhinostone/swig-jinja2');
var out = swig.render('Hello, {{ name|upper }}!', {
locals: { name: 'world' }
});
// => Hello, WORLD!
A near-subset of Python Jinja2 — everything below was cross-checked against Jinja2 3.x.
set, if / elif / else, for (with else), block, extends, include, macro, import, from, raw, filter, with, autoescape.** power, // floor-division, ~ string concat, inline-if (a if c else b), Python slicing (seq[start:stop:step]), is <test> / is not <test>, plus {{- … -}} / {%- … -%} whitespace control.is tests — defined, undefined, none, even, odd, divisibleby, iterable, mapping, sequence, string, number, boolean, callable, lower, upper, sameas.upper, lower, capitalize, title, trim, truncate, replace, striptags, format, wordcount, wordwrap, indent, center, urlencode, escape / e, safe, first, last, join, reverse, sort, length / count, list, unique, batch, slice, dictsort, groupby, min, max, sum, random, abs, round, int, float, default / d, tojson, date). See lib/filters.js for the full list.renderFileAsync / compileFileAsync for async loaders.{% call %}, {% do %}, {% trans %} — deferred / Jinja2 extensions.map / select / reject / selectattr / rejectattr filters — deferred.{% extends %} / {% import %} / {% from %} — string-literal paths only.{% set foo["x"] = … %} — use dot-path notation.Source: gina-io/swig/packages/swig-jinja2. File issues and PRs at gina-io/swig.
MIT. See LICENSE in the monorepo root.
FAQs
Jinja2-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.
The npm package @rhinostone/swig-jinja2 receives a total of 564 weekly downloads. As such, @rhinostone/swig-jinja2 popularity was classified as not popular.
We found that @rhinostone/swig-jinja2 demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.