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
3
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 0.1.11 to 0.1.12

2

lib/template-mixins.js

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

error: this.errors && this.errors[key],
maxlength: extension.maxlength || maxlength(key),
maxlength: maxlength(key) || extension.maxlength,
required: extension.required !== undefined ? extension.required : true,

@@ -92,0 +92,0 @@ pattern: extension.pattern

{
"name": "hmpo-template-mixins",
"version": "0.1.11",
"version": "0.1.12",
"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",

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

it('uses maxlength property set at a field level over default option', function () {
middleware = mixins(translate, {
'field-name': {
'validate': [
{ type: 'maxlength', arguments: 10 }
]
}
});
middleware(req, res, next);
res.locals['input-phone']().call(res.locals, 'field-name');
render.should.have.been.calledWith(sinon.match({
maxlength: 10
}));
});
});

@@ -92,0 +107,0 @@

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