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

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 6.0.2 to 6.0.3

12

cjs/createjs.js

@@ -11,4 +11,4 @@ "use strict";

function setSegment(category, srcObj, trgObj, ntObj, key) {
var srcValue = srcObj[key] || '';
var trgValue = trgObj[key] || '';
var srcValue = srcObj[key];
var trgValue = trgObj[key];

@@ -52,2 +52,6 @@ if (_typeof(srcValue) === 'object' && _typeof(trgValue) === 'object') {

trgKeys = trgKeys || {};
var keys = Object.keys(srcKeys);
Object.keys(trgKeys).forEach(function (k) {
if (keys.indexOf(k) < 0) keys.push(k);
});

@@ -57,3 +61,3 @@ if (ns && typeof ns === 'string') {

var nsObj = js.resources[ns];
Object.keys(srcKeys).forEach(function (srcKey) {
keys.forEach(function (srcKey) {
setSegment(nsObj, srcKeys, trgKeys, ntKeys, srcKey);

@@ -65,3 +69,3 @@ });

Object.keys(srcKeys).forEach(function (ns) {
keys.forEach(function (ns) {
js.resources[ns] = {};

@@ -68,0 +72,0 @@ Object.keys(srcKeys[ns]).forEach(function (srcKey) {

@@ -113,5 +113,3 @@ "use strict";

return unit;
}, {
source: ''
});
}, {});
return addAdditionalAttributes(jsUnit, transUnit.attributes);

@@ -118,0 +116,0 @@ }

@@ -55,6 +55,3 @@ "use strict";

var namespace = options.namespace || file.attributes.id;
var initValues = {
source: '',
target: ''
};
var initValues = {};
if (!result.targetLanguage) delete initValues.target;

@@ -61,0 +58,0 @@ file.elements = file.elements || [];

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function setSegment(category, srcObj, trgObj, ntObj, key) {
var srcValue = srcObj[key] || '';
var trgValue = trgObj[key] || '';
var srcValue = srcObj[key];
var trgValue = trgObj[key];

@@ -44,2 +44,6 @@ if (_typeof(srcValue) === 'object' && _typeof(trgValue) === 'object') {

trgKeys = trgKeys || {};
var keys = Object.keys(srcKeys);
Object.keys(trgKeys).forEach(function (k) {
if (keys.indexOf(k) < 0) keys.push(k);
});

@@ -49,3 +53,3 @@ if (ns && typeof ns === 'string') {

var nsObj = js.resources[ns];
Object.keys(srcKeys).forEach(function (srcKey) {
keys.forEach(function (srcKey) {
setSegment(nsObj, srcKeys, trgKeys, ntKeys, srcKey);

@@ -57,3 +61,3 @@ });

Object.keys(srcKeys).forEach(function (ns) {
keys.forEach(function (ns) {
js.resources[ns] = {};

@@ -60,0 +64,0 @@ Object.keys(srcKeys[ns]).forEach(function (srcKey) {

@@ -102,5 +102,3 @@ import convert from 'xml-js';

return unit;
}, {
source: ''
});
}, {});
return addAdditionalAttributes(jsUnit, transUnit.attributes);

@@ -107,0 +105,0 @@ }

@@ -44,6 +44,3 @@ import convert from 'xml-js';

var namespace = options.namespace || file.attributes.id;
var initValues = {
source: '',
target: ''
};
var initValues = {};
if (!result.targetLanguage) delete initValues.target;

@@ -50,0 +47,0 @@ file.elements = file.elements || [];

function setSegment (category, srcObj, trgObj, ntObj, key) {
const srcValue = srcObj[key] || ''
const trgValue = trgObj[key] || ''
const srcValue = srcObj[key]
const trgValue = trgObj[key]

@@ -39,2 +39,7 @@ if (typeof srcValue === 'object' && typeof trgValue === 'object') {

const keys = Object.keys(srcKeys)
Object.keys(trgKeys).forEach((k) => {
if (keys.indexOf(k) < 0) keys.push(k)
})
if (ns && typeof ns === 'string') {

@@ -44,3 +49,3 @@ js.resources[ns] = {}

Object.keys(srcKeys).forEach((srcKey) => {
keys.forEach((srcKey) => {
setSegment(nsObj, srcKeys, trgKeys, ntKeys, srcKey)

@@ -53,3 +58,3 @@ })

Object.keys(srcKeys).forEach((ns) => {
keys.forEach((ns) => {
js.resources[ns] = {}

@@ -56,0 +61,0 @@

@@ -95,3 +95,3 @@ import convert from 'xml-js'

return unit
}, { source: '' })
}, { /* source: '' */ })

@@ -98,0 +98,0 @@ return addAdditionalAttributes(jsUnit, transUnit.attributes)

@@ -41,3 +41,3 @@ import convert from 'xml-js'

const initValues = { source: '', target: '' }
const initValues = { /* source: '', target: '' */ }
if (!result.targetLanguage) delete initValues.target

@@ -44,0 +44,0 @@

{
"name": "xliff",
"version": "6.0.2",
"version": "6.0.3",
"description": "xliff2js and js2xliff converter xliff utils",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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