Socket
Socket
Sign inDemoInstall

gettext-handlebars

Package Overview
Dependencies
7
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

31

index.js

@@ -35,18 +35,25 @@ var Handlebars = require('handlebars');

if (statement.type && statement.type === 'sexpr') {
if (keywords.indexOf(statement.id.string) >= 0) {
var idx = keywordSpec[statement.id.string],
param = statement.params[idx[0]];
switch (statement.type) {
case 'sexpr':
if (keywords.indexOf(statement.id.string) >= 0) {
var idx = keywordSpec[statement.id.string],
param = statement.params[idx[0]];
if (param && param.type === 'STRING') {
msgs[param.string] = msgs[param.string] || {line: []};
msgs[param.string].line.push(param.firstLine);
}
if (param && param.type === 'STRING') {
msgs[param.string] = msgs[param.string] || {line: []};
msgs[param.string].line.push(param.firstLine);
}
if (idx[1] && statement.params[idx[1]]) {
msgs[param.string].plural = msgs[param.string].plural || statement.params[idx[1]].string;
if (idx[1] && statement.params[idx[1]]) {
msgs[param.string].plural = msgs[param.string].plural || statement.params[idx[1]].string;
}
}
}
statement.params.reduce(isMsg, msgs);
statement.params.reduce(isMsg, msgs);
break;
case 'block':
statement.program.statements.reduce(isMsg, msgs);
break;
}

@@ -53,0 +60,0 @@

{
"name": "gettext-handlebars",
"version": "0.2.0",
"version": "0.2.1",
"description": "Extract translatable strings from Handlebars templates",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc