Gathering detailed insights and metrics for velocityjs
Gathering detailed insights and metrics for velocityjs
Gathering detailed insights and metrics for velocityjs
Gathering detailed insights and metrics for velocityjs
amplify-velocity-template
Velocity Template Language(VTL) for JavaScript
react-v
Easy and intuitive velocityjs animations in React
marionette-animated-region
Backbone.Marionette animated region based on Velocity.js animation library
react-page-transitions
Page tranistions for ReactJS based on VelocityJS library. Mobile friendly. High performance.
npm install velocityjs
97.3
Supply Chain
99.6
Quality
77.6
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
606 Stars
370 Commits
143 Forks
58 Watching
8 Branches
17 Contributors
Updated on 15 Nov 2024
Minified
Minified + Gzipped
JavaScript (83.19%)
Yacc (8.97%)
Lex (7.06%)
Makefile (0.5%)
TypeScript (0.29%)
Cumulative downloads
Total Downloads
Last day
-1.6%
93,865
Compared to previous day
Last week
3.3%
521,303
Compared to previous week
Last month
-1.8%
2,178,561
Compared to previous month
Last year
8.6%
25,733,789
Compared to previous year
1
6
Velocityjs is velocity template engine for javascript.
via npm:
1$ npm install velocityjs
Compatible with all modern browsers. You can try test case in your browser to test it.
For other lower version browsers, you need have those polyfill function.
You can find a lot of examples from the tests directory. There is no different between the use of browser and NodeJs.
{
// render method
render(vm: string, context?: Object, macros?: Object): string;
parse(vm: string, config?: Object, ignorespace?: boolean): Array<Ast>;
Compile: {
(asts: Array<Ast>, config?: Object): {
render(context?: Object, macros?: Object);
};
};
}
params:
#include('path/xxx')
, you can define you inlcude
macro function1var Velocity = require('velocityjs'); 2 3Velocity.render('string of velocity', context, macros);
context
is an object or undefined, for vm $foo.bar
, data look up path will be context.foo.bar
.
context
can have method, and call it just on velocity string.
The method of context, will have eval
method on this
of inner method body. You can eval
to rerender velocity string, such as test code $control.setTemplate.
parse
method can parse vm, and return ast tree of velocity.
Compile
will render asts to result string.
var Compile = Velocity.Compile;
var asts = Velocity.parse('string of velocity');
(new Compile(asts)).render(context, macros);
params:
false
, default not escape variable to html encode, you can set true to open it.{control: true}
, so $control.html
will not escape.development
will throw error when null values are used#set
value, @see https://github.com/shepherdwind/velocity.js/pull/105params:
#cms(1) hello #end
, you can set {cms: true}
Syntax you can find from velocity user guide。
Directives supports have set
, foreach
, if|else|elseif
, macro
, break
, stop
.
Some othe directive evaluate
, define
, parse
, do not supported default, but You can realize by context or macros, for example parse
You can find help from those ways:
Recommend an other velocity.
(The MIT License)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/2 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More