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

hmpo-template-mixins

Package Overview
Dependencies
Maintainers
4
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hmpo-template-mixins - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

lib/template-mixins.js

@@ -389,3 +389,3 @@ 'use strict';

url = Hogan.compile(url).render(this);
return path.resolve(req.baseUrl, url);
return req.baseUrl ? path.resolve(req.baseUrl, url) : url;
};

@@ -392,0 +392,0 @@ };

{
"name": "hmpo-template-mixins",
"version": "4.0.0",
"version": "4.0.1",
"description": "A middleware that exposes a series of Mustache mixins on res.locals to ease usage of forms, translations, and some general needs.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -976,2 +976,9 @@ var mixins = require('../lib/template-mixins');

it('returns path if baseUrl is not set', function () {
req.baseUrl = undefined;
middleware(req, res, next);
res.locals.url().call(res.locals, 'path').should.equal('path');
res.locals.url().call(res.locals, './path').should.equal('./path');
});
it('does not prepend the baseUrl to absolute paths', function () {

@@ -978,0 +985,0 @@ req.baseUrl = '/base';

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