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

hbs

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hbs - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

33

lib/hbs.js

@@ -1,10 +0,5 @@

// builtin
var fs = require('fs');
var path = require('path');
var walk = require('walk').walk;
// handle simple flow control
var after = require('after');
// handle async helpers
var async = require('./async');

@@ -26,3 +21,3 @@

this.Utils = this.handlebars.Utils;
}
};

@@ -115,3 +110,3 @@ // express 3.x template engine compliance

layout_filename += extension;
};
}

@@ -144,3 +139,3 @@ var layout_template = cache[layout_filename];

// express 2.x template engine compliance
Instance.prototype.compile = function (str, options) {
Instance.prototype.compile = function (str) {
if (typeof str !== 'string') {

@@ -180,4 +175,5 @@ return str;

if (!err) {
var templateName = path.basename(filepath, path.extname(filepath));
templateName = templateName.replace(/[ -]/g, '_');
var ext = path.extname(filepath);
var templateName = path.relative(directory, filepath)
.slice(0, -(ext.length)).replace(/[ -]/g, '_');
handlebars.registerPartial(templateName, data);

@@ -190,13 +186,6 @@ }

fs.readdir(directory, function(err, filenames) {
if (err) {
return done(err);
}
walk(directory).on('file', function(root, stat, next) {
register(path.join(root, stat.name), next);
}).on('end', done || function() {});
var next = after(filenames.length, done || function() {});
filenames.forEach(function(filename) {
register(path.join(directory, filename), next);
});
});
};

@@ -212,3 +201,3 @@

module.exports.create = function() {
return new Instance();
return new Instance();
};
{
"name": "hbs",
"description": "Express.js template engine plugin for Handlebars",
"version": "2.3.1",
"version": "2.4.0",
"homepage": "https://github.com/donpark/hbs",

@@ -13,3 +13,3 @@ "author": "Don Park <donpark@docuverse.com> (http://blog.docuverse.com)",

"handlebars": "1.0.12",
"after": "0.8.1"
"walk": "2.2.1"
},

@@ -16,0 +16,0 @@ "devDependencies": {

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