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
1
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.0.0 to 0.0.1

.eslintrc

18

lib/template-mixins.js

@@ -109,5 +109,5 @@ 'use strict';

function checkbox(key, options) {
options = options || {};
options.required = options.required || false;
function checkbox(key, opts) {
opts = opts || {};
opts.required = opts.required || false;
var selected = false;

@@ -117,6 +117,6 @@ if (this.values && this.values[key] !== undefined) {

}
return _.extend(options, {
return _.extend(opts, {
key: key,
error: this.errors && this.errors[key],
invalid: this.errors && this.errors[key] && options.required,
invalid: this.errors && this.errors[key] && opts.required,
label: t(sharedTranslationsKey + '.fields.' + key + '.label'),

@@ -198,5 +198,5 @@ selected: selected

res.locals['checkbox-compound'] = function () {
var options = { compound: true };
var opts = { compound: true };
return function (key) {
return compiled['partials/forms/checkbox'].render(checkbox.call(this, key, options));
return compiled['partials/forms/checkbox'].render(checkbox.call(this, key, opts));
};

@@ -206,5 +206,5 @@ };

res.locals['checkbox-required'] = function () {
var options = { required: true };
var opts = { required: true };
return function (key) {
return compiled['partials/forms/checkbox'].render(checkbox.call(this, key, options));
return compiled['partials/forms/checkbox'].render(checkbox.call(this, key, opts));
};

@@ -211,0 +211,0 @@ };

{
"name": "hmpo-template-mixins",
"version": "0.0.0",
"version": "0.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.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "npm run lint",
"lint": "./node_modules/.bin/eslint ."
},

@@ -33,3 +34,6 @@ "repository": {

"underscore": "^1.7.0"
},
"devDependencies": {
"eslint": "^0.14.1"
}
}
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