Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pofile

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pofile - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

44

lib/po.js

@@ -92,3 +92,4 @@ var fs = require('fs'),

context = null,
plural = 0;
plural = 0,
obsolete = false;

@@ -99,2 +100,4 @@ function finish() {

item = new PO.Item();
item.obsolete = obsolete;
obsolete = false;
}

@@ -114,2 +117,10 @@ }

add = false;
if (line.match(/^#\~/)) { // Obsolete item
obsolete = true;
line = trim(line.substring(2));
} else {
obsolete = false;
}
if (line.match(/^#:/)) { // Reference

@@ -181,2 +192,3 @@ finish();

this.flags = {};
this.obsolete = false;
};

@@ -213,19 +225,13 @@

if (this.comments.length > 0) {
this.comments.forEach(function (c) {
lines.push('# ' + c);
});
}
this.comments.forEach(function (c) {
lines.push('# ' + c);
});
if (this.extractedComments.length > 0) {
this.extractedComments.forEach(function (c) {
lines.push('#. ' + c);
});
}
this.extractedComments.forEach(function (c) {
lines.push('#. ' + c);
});
if (this.references.length > 0) {
this.references.forEach(function (ref) {
lines.push('#: ' + ref);
});
}
this.references.forEach(function (ref) {
lines.push('#: ' + ref);
});

@@ -252,5 +258,9 @@ var flags = Object.keys(this.flags);

return lines.join("\n");
if (this.obsolete) {
return "#~ " + lines.join("\n#~ ");
} else {
return lines.join("\n");
}
};
module.exports = PO;
{
"name": "pofile",
"description": "Parse and serialize Gettext PO files.",
"version": "0.2.6",
"version": "0.2.7",
"author": {

@@ -6,0 +6,0 @@ "name": "Ruben Vermeersch",

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