Socket
Socket
Sign inDemoInstall

xliff

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xliff - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

util/escape.js

3

js2xliff.js
const convert = require('xml-js');
const makeElement = require('./util/makeNodes').makeElement;
const makeText = require('./util/makeNodes').makeText;
const escape = require('./util/escape');

@@ -35,3 +36,3 @@ function js2xliff(obj, opt, cb) {

}
const u = makeElement('unit', {id: k}, [segment]);
const u = makeElement('unit', {id: escape(k)}, [segment]);
f.elements.push(u);

@@ -38,0 +39,0 @@ });

const convert = require('xml-js');
const makeElement = require('./util/makeNodes').makeElement;
const makeText = require('./util/makeNodes').makeText;
const escape = require('./util/escape');

@@ -36,3 +37,3 @@ function jsToXliff12(obj, opt, cb) {

Object.keys(obj.resources[nsName]).forEach((k) => {
const u = makeElement('trans-unit', {id: k}, true);
const u = makeElement('trans-unit', {id: escape(k)}, true);
u.elements.push(makeElement('source', null, [makeText(obj.resources[nsName][k].source)]));

@@ -39,0 +40,0 @@ u.elements.push(makeElement('target', null, [makeText(obj.resources[nsName][k].target)]));

{
"name": "xliff",
"version": "3.0.0",
"version": "3.0.1",
"description": "xliff2js and js2xliff converter xliff utils",

@@ -10,3 +10,3 @@ "main": "index.js",

"dependencies": {
"xml-js": "1.2.2"
"xml-js": "1.6.2"
},

@@ -16,3 +16,3 @@ "devDependencies": {

"expect.js": "^0.3.1",
"mocha": "^3.2.0"
"mocha": "^5.0.5"
},

@@ -19,0 +19,0 @@ "scripts": {

{
"key1": "Hello",
"key2": "An application to manipulate and process XLIFF documents",
"key.nested": "XLIFF Data Manager"
"key.nested": "XLIFF Data Manager",
"to ' \"esc<ap> & e": "special chars"
}
{
"key1": "Hallo",
"key2": "Eine Applikation um XLIFF Dokumente zu manipulieren und verarbeiten",
"key.nested": "XLIFF Daten Manager"
"key.nested": "XLIFF Daten Manager",
"to ' \"esc<ap> & e": "spezielle Charakter"
}

@@ -15,2 +15,6 @@ {

"target": "XLIFF Daten Manager"
},
"to ' \"esc<ap> & e": {
"source": "special chars",
"target": "spezielle Charakter"
}

@@ -17,0 +21,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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