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

flexmonster-compressor

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flexmonster-compressor - npm Package Compare versions

Comparing version 2.7.7 to 2.7.8

test/data/csv-data-delimiter.csv

2

package.json
{
"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(""));

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