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

@keen.io/data-export

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keen.io/data-export - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

dist/constants.d.ts

19

CHANGELOG.md

@@ -6,4 +6,23 @@ # Change Log

# [1.1.0](https://github.com/keen/keen/compare/@keen.io/data-export@1.0.1...@keen.io/data-export@1.1.0) (2021-09-30)
### Features
* 🎸 csv export parsers ([60a1f62](https://github.com/keen/keen/commit/60a1f621a2d6f749aa6a584e56f1a8188c9af6af))
* 🎸 csv export transforms ([01d69c2](https://github.com/keen/keen/commit/01d69c298ef785ba2f7463f267f77c04a7c09d17))
* 🎸 data exporter ([2e5bc47](https://github.com/keen/keen/commit/2e5bc4709fd34c9dc5d2841c2cbef9501cba0711))
* 🎸 export output to csv file ([16d1405](https://github.com/keen/keen/commit/16d1405dcc8a0f04ab2726c14677662da6b7c93d))
* 🎸 funnel chart export ([8ea490b](https://github.com/keen/keen/commit/8ea490b0c50aa93dd374a0c077575c145dd2dfca))
* 🎸 funnel csv export ([960dd1b](https://github.com/keen/keen/commit/960dd1b21f9cab86c3c4c8a6069ff03baaeedaf0))
* 🎸 line / area chart csv transformations ([e72aee6](https://github.com/keen/keen/commit/e72aee64eb111c1f5af386bc51f60b27718c1db0))
* 🎸 line chart csv export ([dea5886](https://github.com/keen/keen/commit/dea58864a70f980367426964de4a4863b67e2554))
* 🎸 tranaform heatmap csv ([821f2d9](https://github.com/keen/keen/commit/821f2d9ec3e47955fe41d931036e57988bbb803b))
## 1.0.1 (2021-01-29)
**Note:** Version bump only for package @keen.io/data-export

7

dist/csv/export-to-csv.d.ts

@@ -1,5 +0,2 @@

export declare const exportToCSV: ({ data, columnDelimiter, lineDelimiter, }: {
data?: Record<string, any>;
columnDelimiter?: string;
lineDelimiter?: string;
}) => string;
import { ExportOutput } from '../types';
export declare const exportToCSV: (data?: ExportOutput, columnDelimiter?: string, lineDelimiter?: string) => string;

@@ -1,32 +0,10 @@

export var exportToCSV = function (_a) {
var _b = _a.data, data = _b === void 0 ? null : _b, _c = _a.columnDelimiter, columnDelimiter = _c === void 0 ? ',' : _c, _d = _a.lineDelimiter, lineDelimiter = _d === void 0 ? '\n' : _d;
var result;
var ctr;
if (data === null || !data.length) {
return null;
}
var keys = Object.keys(data[0]);
result = '';
result += keys.join(columnDelimiter);
result += lineDelimiter;
data.forEach(function (item) {
ctr = 0;
keys.forEach(function (key) {
if (ctr > 0) {
result += columnDelimiter;
}
var value = item[key];
if (typeof item[key] === 'string' &&
item[key].includes(columnDelimiter)) {
value = "\"" + item[key] + "\"";
}
if (Array.isArray(item[key])) {
value = "\"" + item[key].join(', ') + "\"";
}
result += value;
ctr++;
});
result += lineDelimiter;
export var exportToCSV = function (data, columnDelimiter, lineDelimiter) {
if (data === void 0) { data = []; }
if (columnDelimiter === void 0) { columnDelimiter = ','; }
if (lineDelimiter === void 0) { lineDelimiter = '\n'; }
var result = '';
data.forEach(function (row) {
result += row.join(columnDelimiter) + lineDelimiter;
});
return result;
};
import { exportToCSV } from './export-to-csv';
export default exportToCSV;
export { exportToCSV };
import { exportToCSV } from './export-to-csv';
export default exportToCSV;
export { exportToCSV };

@@ -1,2 +0,2 @@

import exportToCSV from './csv';
export { exportToCSV };
import DataExport from './data-export';
export { DataExport };

@@ -1,2 +0,2 @@

import exportToCSV from './csv';
export { exportToCSV };
import DataExport from './data-export';
export { DataExport };
{
"name": "@keen.io/data-export",
"version": "1.0.1",
"version": "1.1.0",
"description": "Keen data export utilities",

@@ -25,2 +25,11 @@ "author": "Keen.IO <team@keen.io> (https://keen.io/)",

},
"dependencies": {
"@keen.io/charts-utils": "^1.13.0",
"@keen.io/parser": "^2.8.97",
"@keen.io/query": "^1.2.0"
},
"devDependencies": {
"@keen.io/charts": "^2.33.0",
"@keen.io/widgets": "^2.16.8"
},
"bugs": {

@@ -32,3 +41,3 @@ "url": "https://github.com/keen/keen/issues"

},
"gitHead": "9447afaa5762a00bd25d8ad0a14820443c98666f"
"gitHead": "1ceed93ad9e4fcc8bf89bb0ee117f867030ce580"
}
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