
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
minitemplator
Advanced tools
MiniTemplator is a compact, optimized template engine primarily used for generating HTML output.
Variables:
${variableName}
Blocks:
<!-- $beginBlock blockName -->
... block content ...
<!-- $endBlock blockName -->
Conditional statements:
<!-- $if condExpr -->
...
<!-- $elseIf condExpr -->
...
<!-- $else -->
...
<!-- $endIf -->
Include a subtemplate:
<!-- $include fileName -->
There are two phases when using MiniTemplator templates.
When a template is parsed, condition expressions are evaluated, conditional statements are resolved and subtemplates are included. A template is normally loaded and parsed only once and then used many times. A parsed template can be cached in memory for later re-use.
In the second phase, template variables are set and blocks are added. When the document buildup is complete, everything is merged into a HTML string, which is the output of the template engine.
There are two kinds of variables.
Condition variables are used in $if
and $elseIf
statements.
Template variables are used to place content into the template.
addBlock()
method for the block is called.undefined
and null
are converted into an empty string.When the shortFormEnabled
option is set to true
, the following alternative form can be used for conditional statements:
<$? condExpr>
... content for "if" case ...
<$: condExpr>
... content for "elseIf" case ...
<$:>
... content for "else" case ...
<$/?>
Example:
<$?de> Hallo Welt!
<$:fr> Bonjour le monde!
<$:it> Ciao mondo!
<$: > Hello world!
<$/?>
FAQs
A compact, optimized template engine for HTML.
The npm package minitemplator receives a total of 2 weekly downloads. As such, minitemplator popularity was classified as not popular.
We found that minitemplator 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.