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

broadway-handlebars

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broadway-handlebars - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

40

index.js

@@ -82,8 +82,8 @@ var _ = require('lodash'),

Handlebars.registerHelper('ifeval', function(expression, options) {
var conditional = false;
with(this) {
conditional = eval(expression);
}
return conditional ? options.fn(this) : options.inverse(this);
});
var conditional = false;
with(this) {
conditional = eval(expression);
}
return conditional ? options.fn(this) : options.inverse(this);
});

@@ -94,15 +94,16 @@ // Similar to standard print {{value}}, but with an optional fallback value.

Handlebars.registerHelper('def', function(expression, options) {
var val = null,
def = options.hash.def || '';
var val = null,
def = options.hash.def || '';
try {
with(this) {
val = eval(expression);
}
}
catch (e) {
val = expression;
}
return val ? val : def;
});
try {
with(this) {
val = eval(expression);
}
}
catch (e) {
val = expression;
}
return val ? val : def;
});

@@ -152,2 +153,5 @@ // Inject external handlebar helpers.

// expose the instance of hb so that helpers or other things can be attached async.
this.render.instance = Handlebars;
var _compile = function(view, markup) {

@@ -154,0 +158,0 @@

{
"name": "broadway-handlebars",
"version": "0.2.2",
"main": "index",
"description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.",
"keywords": [
"node",
"flatiron",
"broadway",
"handlebars",
"html",
"render"
],
"author": {
"name": "Vast",
"email": "",
"web": "http://vastdevblog.vast.com/"
},
"license": "MIT",
"version": "0.2.3",
"main": "index",
"description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.",
"keywords": [
"node",
"flatiron",
"broadway",
"handlebars",
"html",
"render"
],
"author": {
"name": "Vast",
"email": "",
"web": "http://vastdevblog.vast.com/"
},
"license": "MIT",
"repository": {

@@ -34,14 +34,13 @@ "type": "git",

"dependencies": {
"lodash": "1.0.1",
"handlebars": "~1.0.11",
"broadway": "0.2.6",
"lodash": "1.3.x",
"handlebars": "~1.0.11",
"findit": "0.1.2",
"async": "0.2.5"
},
"async": "0.2.6"
},
"devDependencies": {
"tap": "*"
},
"tap": "*",
"broadway": "0.2.7"
},
"optionalDependencies": {},
"homepage": "http://vastdevblog.vast.com/"
}
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