Comparing version 6.0.1 to 6.0.2
@@ -73,2 +73,3 @@ "use strict"; | ||
var key = child.attributes.id; | ||
if (!child.elements) return parent; | ||
var children = child.elements.filter(function (e) { | ||
@@ -75,0 +76,0 @@ return e.name === 'trans-unit' || e.name === 'group'; |
@@ -74,2 +74,3 @@ "use strict"; | ||
function createUnits(parent, initValues) { | ||
if (!parent.elements) return {}; | ||
return parent.elements.reduce(function (file, unit) { | ||
@@ -112,2 +113,3 @@ var key = unit.attributes.id; | ||
function createUnit(unit, initValues) { | ||
if (!unit.elements) return undefined; | ||
return unit.elements.reduce(function (unit, segment) { | ||
@@ -114,0 +116,0 @@ if (['segment', 'notes'].indexOf(segment.name) < 0) return unit; |
@@ -62,2 +62,3 @@ import convert from 'xml-js'; | ||
var key = child.attributes.id; | ||
if (!child.elements) return parent; | ||
var children = child.elements.filter(function (e) { | ||
@@ -64,0 +65,0 @@ return e.name === 'trans-unit' || e.name === 'group'; |
@@ -63,2 +63,3 @@ import convert from 'xml-js'; | ||
function createUnits(parent, initValues) { | ||
if (!parent.elements) return {}; | ||
return parent.elements.reduce(function (file, unit) { | ||
@@ -101,2 +102,3 @@ var key = unit.attributes.id; | ||
function createUnit(unit, initValues) { | ||
if (!unit.elements) return undefined; | ||
return unit.elements.reduce(function (unit, segment) { | ||
@@ -103,0 +105,0 @@ if (['segment', 'notes'].indexOf(segment.name) < 0) return unit; |
@@ -62,2 +62,3 @@ import convert from 'xml-js' | ||
const key = child.attributes.id | ||
if (!child.elements) return parent | ||
const children = child.elements.filter((e) => e.name === 'trans-unit' || e.name === 'group') | ||
@@ -64,0 +65,0 @@ if (children.length) { |
@@ -60,2 +60,3 @@ import convert from 'xml-js' | ||
function createUnits (parent, initValues) { | ||
if (!parent.elements) return {} | ||
return parent.elements.reduce((file, unit) => { | ||
@@ -89,2 +90,3 @@ const key = unit.attributes.id | ||
// source, target, note | ||
if (!unit.elements) return undefined | ||
return unit.elements.reduce((unit, segment) => { | ||
@@ -91,0 +93,0 @@ if (['segment', 'notes'].indexOf(segment.name) < 0) return unit |
{ | ||
"name": "xliff", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"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
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
558003
11355