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.0.1 to 0.1.0

.eslintignore

16

lib/template-mixins.js

@@ -32,4 +32,8 @@ 'use strict';

var viewEngine = options && options.viewEngine || 'html';
var sharedTranslationsKey = options && options.sharedTranslationsKey || 'shared';
var sharedTranslationsKey = options && options.sharedTranslationsKey || '';
if (sharedTranslationsKey && !sharedTranslationsKey.match(/\.$/)) {
sharedTranslationsKey += '.';
}
var PARTIALS = [

@@ -74,4 +78,4 @@ 'partials/forms/input-text-group',

value: this.values && this.values[key],
label: t(sharedTranslationsKey + '.fields.' + key + '.label'),
hint: i18nLookup(sharedTranslationsKey + '.fields.' + key + '.hint'),
label: t(sharedTranslationsKey + 'fields.' + key + '.label'),
hint: i18nLookup(sharedTranslationsKey + 'fields.' + key + '.hint'),
error: this.errors && this.errors[key],

@@ -122,3 +126,3 @@ maxlength: extension.maxlength || maxlength(key),

invalid: this.errors && this.errors[key] && opts.required,
label: t(sharedTranslationsKey + '.fields.' + key + '.label'),
label: t(sharedTranslationsKey + 'fields.' + key + '.label'),
selected: selected

@@ -217,3 +221,3 @@ });

return function (props) {
props = props.split(' ');
props = (props || '').split(' ');
var def = 'next',

@@ -224,3 +228,3 @@ value = props[0] || def,

var obj = {
value: t(sharedTranslationsKey + '.buttons.' + value),
value: t(sharedTranslationsKey + 'buttons.' + value),
id: id

@@ -227,0 +231,0 @@ };

{
"name": "hmpo-template-mixins",
"version": "0.0.1",
"version": "0.1.0",
"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": "npm run lint",
"lint": "./node_modules/.bin/eslint ."
"test": "npm run lint && npm run unit",
"lint": "eslint .",
"unit": "mocha test/. --require ./test/helpers.js --recursive"
},

@@ -36,4 +37,8 @@ "repository": {

"devDependencies": {
"eslint": "^0.14.1"
"chai": "^2.1.0",
"eslint": "^0.14.1",
"mocha": "^2.1.0",
"sinon": "^1.12.2",
"sinon-chai": "^2.7.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