Comparing version 2.0.0 to 2.1.0
@@ -9,3 +9,4 @@ module.exports = { | ||
createjs: require('./createjs'), | ||
createxliff: require('./createxliff') | ||
createxliff: require('./createxliff'), | ||
createxliff12: require('./createxliff12') | ||
}; |
{ | ||
"name": "xliff", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "xliff2js and js2xliff converter xliff utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -80,4 +80,4 @@ [![travis](https://img.shields.io/travis/locize/xliff.svg)](https://travis-ci.org/locize/xliff) [![npm](https://img.shields.io/npm/v/xliff.svg)](https://npmjs.org/package/xliff) | ||
const js2kliff = require('xliff/js2kliff'); | ||
js2kliff(js, (err, res) => { | ||
const js2xliff = require('xliff/js2xliff'); | ||
js2xliff(js, (err, res) => { | ||
// res is like xliff | ||
@@ -119,3 +119,3 @@ }); | ||
"key.nested": "XLIFF Daten Manager" | ||
} | ||
}, | ||
'namespace1', | ||
@@ -126,4 +126,4 @@ (err, res) => { | ||
const createkliff = require('xliff/createkliff'); | ||
createkliff( | ||
const createxliff = require('xliff/createxliff'); | ||
createxliff( | ||
js.sourceLanguage, | ||
@@ -140,3 +140,3 @@ js.targetLanguage, | ||
"key.nested": "XLIFF Daten Manager" | ||
} | ||
}, | ||
'namespace1', | ||
@@ -202,3 +202,22 @@ (err, res) => { | ||
const createxliff12 = require('xliff/createxliff12'); | ||
createxliff12( | ||
js.sourceLanguage, | ||
js.targetLanguage, | ||
{ | ||
"key1": "Hello", | ||
"key2": "An application to manipulate and process XLIFF documents", | ||
"key.nested": "XLIFF Data Manager" | ||
}, | ||
{ | ||
"key1": "Hallo", | ||
"key2": "Eine Applikation um XLIFF Dokumente zu manipulieren und verarbeiten", | ||
"key.nested": "XLIFF Daten Manager" | ||
}, | ||
'namespace1', | ||
(err, res) => { | ||
// res is like xliff | ||
}); | ||
``` |
@@ -89,2 +89,16 @@ const expect = require('expect.js'); | ||
test('createxliff12', (fn) => (done) => { | ||
fn(fixtures.example.js.sourceLanguage, | ||
fixtures.example.js.targetLanguage, | ||
fixtures.example.js_source, | ||
fixtures.example.js_target, | ||
'namespace1', | ||
(err, res) => { | ||
expect(err).not.to.be.ok(); | ||
expect(res).to.eql(fixtures.example.xliff12); | ||
done(); | ||
} | ||
); | ||
}); | ||
}); | ||
@@ -91,0 +105,0 @@ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
33289
33
624
219
0