Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dustjs-linkedin

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dustjs-linkedin - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

12

lib/dust.js

@@ -22,3 +22,3 @@ var dust = {};

var chunk = new Stub(callback).head;
dust.load(name, chunk, Context.wrap(context)).end();
dust.load(name, chunk, Context.wrap(context, name)).end();
};

@@ -29,3 +29,3 @@

dust.nextTick(function() {
dust.load(name, stream.head, Context.wrap(context)).end();
dust.load(name, stream.head, Context.wrap(context, name)).end();
});

@@ -44,3 +44,3 @@ return stream;

dust.nextTick(function() {
tmpl(master.head, Context.wrap(context)).end();
tmpl(master.head, Context.wrap(context, name)).end();
});

@@ -137,7 +137,9 @@ return master;

Context.wrap = function(context) {
Context.wrap = function(context, name) {
if (context instanceof Context) {
return context;
}
return new Context(new Stack(context));
var global= {};
global.__template_name__ = name;
return new Context(new Stack(context), global);
};

@@ -144,0 +146,0 @@

{
"name": "dustjs-linkedin",
"version": "1.2.4",
"version": "1.2.5",
"author": "Aleksander Williams",

@@ -5,0 +5,0 @@ "description": "Asynchronous templates for the browser and node.js ( LinkedIn fork )",

@@ -33,3 +33,17 @@ var coreTests = [

},
{
name: "global_template",
source: '{#helper foo="bar" boo="boo"} {/helper}',
context: { "helper": function(chunk, context, bodies, params) { return chunk.write(context.global.__template_name__); } },
expected: "global_template",
message: "should render the template name"
},
{
name: "apps/test/foo.tl&v=0.1",
source: '{#helper foo="bar" boo="boo" template="tl/apps/test"} {/helper}',
context: { "helper": function(chunk, context, bodies, params) { return chunk.write(context.global.__template_name__); } },
expected: "apps/test/foo.tl&v=0.1",
message: "should render the template name with paths"
},
{
name: "reference",

@@ -36,0 +50,0 @@ source: "{?one}{one}{/one}",

Sorry, the diff of this file is not supported yet

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