Socket
Socket
Sign inDemoInstall

velocityjs

Package Overview
Dependencies
0
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

2

package.json
{
"name": "velocityjs",
"description": "Velocity Template Language(VTL) for JavaScript",
"version": "0.4.0",
"version": "0.4.1",
"keywords": [

@@ -6,0 +6,0 @@ "velocity template"

@@ -128,4 +128,4 @@ module.exports = function(Velocity, utils){

this.local[contextId] = {};
this.conditions.pop();
this.condition = '';
this.conditions.shift();
this.condition = this.conditions[0] || '';

@@ -132,0 +132,0 @@ return ret;

@@ -499,4 +499,22 @@ var Velocity = require('../src/velocity')

it('eval work with #set', function(){
//这一句非常重要,在node端无需处理,web端必须如此声明
Compile.Parser = Parser
var macros = {
cmsparse: function(str){
return this.eval(str)
}
}
var vm = '#cmsparse($str)'
var o = {
str: '#set($foo = ["hello"," ", "world"])#foreach($word in $foo)$word#end'
}
assert.equal('hello world', render(vm, o, macros))
})
})
describe('self defined function', function() {

@@ -503,0 +521,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc