
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.
velocity-template
Advanced tools
velocity-template is the javascript implementation of the velocity template engine, it can run on browser and node side.
npm install velocity-template --save-dev
import Velocity from "velocity-template"
var tpl = `
#foreach($item in $items)
<li>$item</li>
#end
`
var asts = Velocity.parse(tpl);
var data = {
items: ["a", "b", "c", "d"]
};
var html = (new Velocity.Compile(asts)).render(data);
Velocity.render(vm, context, macros);
#include('path/xxx') , you can define you inlcude macro functionparse method can parse vm, and return ast tree of velocity.
Compile will render asts to result string.
Velocity.parse(vm)
#cms(1) hello #end, you can set {cms: true}new Compile(asts[, config])
var Compile = Velocity.Compile;
var asts = Velocity.parse('string of velocity');
(new Compile(asts)).render(context, macros);
Syntax you can find from velocity user guide。
FAQs
velocity template engine, it can run on browser and node side
We found that velocity-template 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.