New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-merge-gettext

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-merge-gettext - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

20

index.js
var gettextParser = require("gettext-parser");
var through = require('through2');
var _ = require('lodash');

@@ -40,8 +41,19 @@ function getLang(p) {

} else {
var joinedFile = files[files.length - 1].clone({ contents: false });
var parsedContents = gettextParser.po.parse(Buffer.concat(files.map(f => new Buffer(f.contents))));
var clone = files[files.length - 1].clone({ contents: false });
var parsedFiles = [];
joinedFile.contents = gettextParser.po.compile(parsedContents);
for (var i = 0; i < files.length; i++) {
const o = gettextParser.po.parse(files[i].contents);
parsedFiles.push(o);
}
this.push(joinedFile);
var head = _.head(parsedFiles);
var tail = _.tail(parsedFiles);
var final = _.defaultsDeep(head, ...tail);
var contents = gettextParser.po.compile(final);
clone.contents = contents;
this.push(clone);
}

@@ -48,0 +60,0 @@ }

3

package.json
{
"name": "gulp-merge-gettext",
"version": "0.1.1",
"version": "0.2.0",
"description": "Merge po files",

@@ -21,4 +21,5 @@ "main": "index.js",

"gettext-parser": "^1.2.0",
"lodash": "^4.17.2",
"through2": "^2.0.1"
}
}
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