New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jqtpl

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jqtpl - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

test/fixtures/1/layouttest.html

16

lib/jqtpl.express.js

@@ -42,3 +42,3 @@ var jqtpl = require('./jqtpl');

var name = options.filename || markup;
// express calls compile if the template have to be recompiled

@@ -51,11 +51,9 @@ // so we have to clean cache before compile

if (options.debug) {
// print the template generator fn
exports.debug(jqtpl.template[name]);
}
return function render(locals) {
var tpl = jqtpl.tmpl(name, locals, options);
if (options.debug) {
// print the template generator fn
exports.debug(jqtpl.template[name]);
}
return tpl;
return jqtpl.tmpl(name, locals, options);
};

@@ -62,0 +60,0 @@ };

{
"name": "jqtpl",
"description": "A port of jQuery's template engine",
"version": "1.0.5",
"version": "1.0.6",
"author": "Oleg Slobodskoi <oleg008@gmail.com>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -220,3 +220,3 @@ ## This is a port of jQuery's Template Engine to nodejs

// myaction.html
<div>{{partial({test) "mypartial"}}</div>
<div>{{partial(test) "mypartial"}}</div>

@@ -223,0 +223,0 @@ // mypartial.html

@@ -28,8 +28,8 @@ var o = {

app.set('view engine', 'html');
app.set('views', o.root + '/views');
app.set('views', o.root + '/1');
app.set('view options', {layout: false});
// qunit copies jqtpl.express exports to global
app.register('.html', global);
app.get('/:view', function(req, res){
res.render(req.params.view, locals);
app.get('/*', function(req, res){
res.render(req.url.substr(1), locals);
});

@@ -113,2 +113,17 @@ app.listen(o.port);

test("rendering template with a layout turned on", function() {
this.app.set('view options', {layout: true});
this.app.set('views', o.root + '/2');
locals = {
mylocal: "mylocal"
};
stop();
request('/views/test', function(data) {
equal(data, 'abc mylocal', 'template and layout rendered correctly');
start();
});
});
test("rendering multiple times of the same template #29", function() {

@@ -139,1 +154,4 @@ var template = 'Just example ${example}'

});
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc