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

broadway-handlebars

Package Overview
Dependencies
Maintainers
3
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.4.1 to 0.4.2

27

index.js

@@ -10,3 +10,3 @@ // var _ = {

var handlebars = require('handlebars'); // parens will prevent browserify from packaging.
var defaultViewResolver = (typeof(window) === 'undefined') ? require('./viewresolver') : null;
var defaultViewResolver = !process.browser ? require('./viewresolver') : null;

@@ -33,3 +33,3 @@ var bwHandlebars = function() { };

view: {
base: (typeof(window) === 'undefined') ? process.cwd() : null,
base: process.cwd(),
ext: "html"

@@ -117,2 +117,21 @@ }

// Allowing dynamic loading of partials based on value of variable in context
// Call is made like {{{partial "partial.root" partial_name ctx}}} or {{{partial full_partial_string ctx}}}
Handlebars.registerHelper('partial', function(root, name, ctx, hash) {
var ps = Handlebars.partials, path;
if (typeof name === 'object') {
var tmp = name;
name = '';
hash = ctx;
ctx = tmp;
} else if (typeof name === 'undefined') {
name = '';
};
path = root + ((name !== '') ? ('.' + name) : name);
if(typeof ps[path] != 'function')
ps[path] = Handlebars.compile(ps[path]);
return ps[path](ctx, hash);
});
// Inject external handlebar helpers.

@@ -171,3 +190,5 @@ _.each(options.helpers, function(fn, name) {

templateCache[view] = markup ? Handlebars.compile(markup) : function() { throw new Error("View Not Found - " + view); };
templateCache[view] = markup ? Handlebars.compile(markup) : function() {
logger.error("View Not Found - " + view);
};
return templateCache[view];

@@ -174,0 +195,0 @@ };

2

package.json
{
"name": "broadway-handlebars",
"version": "0.4.1",
"version": "0.4.2",
"main": "index",

@@ -5,0 +5,0 @@ "description": "Plugin for flatiron/broadway for rendering with the handlebars view engine.",

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