flexmonster-compressor
Advanced tools
Comparing version 2.7.7 to 2.7.8
{ | ||
"name": "flexmonster-compressor", | ||
"version": "2.7.7", | ||
"version": "2.7.8", | ||
"description": "Flexmonster Compressor for Node.js – a special server-side compression tool that helps you to increase data loading speed from server to Flexmonster Pivot Table component.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -117,2 +117,5 @@ const { BaseReader, ColumnType } = require("./BaseReader"); | ||
chooseDelimiter(row) { | ||
if (this.delimiter != "") { | ||
return this.delimiter; | ||
} | ||
if (!row) { | ||
@@ -119,0 +122,0 @@ return ','; |
module.exports = { | ||
VERSION: "2.7.7", | ||
VERSION: "2.7.8", | ||
VERSION_COMPATIBLE: "2.213" | ||
} |
@@ -5,7 +5,11 @@ const assert = require('assert'); | ||
const toString = require('stream-to-string'); | ||
const { replaceNewLines, removeOcsvHeader, getOcsvHeader } = require('./utils'); | ||
const { | ||
replaceNewLines, | ||
removeOcsvHeader, | ||
getOcsvHeader | ||
} = require('./utils'); | ||
describe('CSV', function () { | ||
let files = [ | ||
'./test/data/csv-data-1', | ||
'./test/data/csv-data-1', | ||
// './test/data/csv-data-2', | ||
@@ -21,2 +25,9 @@ ]; | ||
it('Check custom delimiter', async () => { | ||
const filename = './test/data/csv-data-delimiter'; | ||
let compressed = await toString(compressor.compressCsvFile(`${filename}.csv`, { delimiter: '~' })); | ||
let actual = replaceNewLines(fs.readFileSync(`${filename}.ocsv`).toString()); | ||
assert.equal(removeOcsvHeader(compressed), removeOcsvHeader(actual)); | ||
}); | ||
it('Empty string', async () => { | ||
@@ -23,0 +34,0 @@ let compressed = await toString(compressor.compressCsv("")); |
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
220736
31
6280