Socket
Socket
Sign inDemoInstall

gettext-parser

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gettext-parser - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

28

lib/pocompiler.js

@@ -55,2 +55,6 @@ const { Buffer } = require('safe-buffer');

if (!('eol' in this._options)) {
this._options.eol = '\n';
}
this._translations = [];

@@ -97,3 +101,3 @@

return lines.join('\n');
return lines.join(this._options.eol);
};

@@ -137,3 +141,3 @@

return response.join('\n');
return response.join(this._options.eol);
};

@@ -161,4 +165,6 @@

if (this._options.foldLength > 0) {
lines = sharedFuncs.foldLine(value, this._options.foldLength);
const { foldLength, eol } = this._options;
if (foldLength > 0) {
lines = sharedFuncs.foldLine(value, foldLength);
}

@@ -170,3 +176,3 @@

return `${key} ""\n"${lines.join('"\n"')}"`;
return `${key} ""${eol}"${lines.join(`"${eol}"`)}"`;
};

@@ -218,5 +224,7 @@

if (this._options.sort !== false) {
if (typeof this._options.sort === 'function') {
response = response.sort(this._options.sort);
const { sort, eol } = this._options;
if (sort !== false) {
if (typeof sort === 'function') {
response = response.sort(sort);
} else {

@@ -234,6 +242,6 @@ response = response.sort(sharedFuncs.compareMsgid);

if (this._table.charset === 'utf-8' || this._table.charset === 'ascii') {
return Buffer.from(response.join('\n\n'), 'utf-8');
return Buffer.from(response.join(eol + eol), 'utf-8');
}
return encoding.convert(response.join('\n\n'), this._table.charset);
return encoding.convert(response.join(eol + eol), this._table.charset);
};
{
"name": "gettext-parser",
"description": "Parse and compile gettext po and mo files to/from json, nothing more, nothing less",
"version": "4.1.0",
"version": "4.2.0",
"author": "Andris Reinman",

@@ -6,0 +6,0 @@ "contributors": [

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