Comparing version 1.0.10 to 1.0.11
@@ -11,2 +11,3 @@ var fs = require('fs'); | ||
this.headers = {}; | ||
this.headerOrder = []; | ||
this.items = []; | ||
@@ -36,5 +37,20 @@ }; | ||
var self = this; | ||
var headerOrder = []; | ||
this.headerOrder.forEach(function (key) { | ||
if (key in self.headers) { | ||
headerOrder.push(key); | ||
} | ||
}); | ||
var keys = Object.keys(this.headers); | ||
var self = this; | ||
keys.forEach(function (key) { | ||
if (headerOrder.indexOf(key) === -1) { | ||
headerOrder.push(key); | ||
} | ||
}); | ||
headerOrder.forEach(function (key) { | ||
lines.push('"' + key + ': ' + self.headers[key] + '\\n"'); | ||
@@ -93,2 +109,3 @@ }); | ||
}; | ||
po.headerOrder = []; | ||
@@ -117,2 +134,3 @@ headers.split(/\n/).reduce(function (acc, line) { | ||
po.headers[name] = value; | ||
po.headerOrder.push(name); | ||
} | ||
@@ -119,0 +137,0 @@ }); |
{ | ||
"name": "pofile", | ||
"description": "Parse and serialize Gettext PO files.", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Ruben Vermeersch", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126524
432