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 1.0.1 to 1.0.2

11

lib/po.js

@@ -67,6 +67,11 @@ var fs = require('fs');

var sections = data.split(/\n\n/);
var headers = [sections.shift()];
var headers = [];
//everything until the first 'msgid ""' is considered header
while (headers[headers.length - 1].indexOf('msgid ""') < 0) {
headers.push(sections.shift());
while (sections[0] && (headers.length === 0 || headers[headers.length - 1].indexOf('msgid ""') < 0)) {
if (sections[0].match(/msgid "[^"]/)) {
//found first real string, adding a dummy header item
headers.push('msgid ""');
} else {
headers.push(sections.shift());
}
}

@@ -73,0 +78,0 @@ headers = headers.join('\n');

{
"name": "pofile",
"description": "Parse and serialize Gettext PO files.",
"version": "1.0.1",
"version": "1.0.2",
"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