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

dtable-sdk

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtable-sdk - npm Package Compare versions

Comparing version 0.0.91 to 0.0.92

13

dist/dtable.js

@@ -193,2 +193,15 @@ "use strict";

}, {
key: "importDataIntoNewTable",
value: function importDataIntoNewTable(table_name, columns, rows) {
var tables = this.dtableStore.value.tables;
if (tables.length >= 200) throw new Error('The_number_of_tables_exceeds_200_limit');
if (!table_name) throw new Error('Table_name_is_required');
if (!columns) throw new Error('Columns_is_required');
if (!Array.isArray(columns)) throw new Error('Columns_must_be_array');
if (columns.length === 0) throw new Error('The_number_of_columns_must_be_more_than_0');
if (columns.length >= 500) throw new Error('The_number_of_columns_in_the_current_table_exceeds_the_limit');
if (rows && !Array.isArray(rows)) throw new Error('Rows_must_be_array');
return this.dtableStore.importDataIntoNewTable(table_name, columns, rows);
}
}, {
key: "getActiveView",

@@ -195,0 +208,0 @@ value: function getActiveView() {

17

dist/stat-utils.js

@@ -56,7 +56,6 @@ "use strict";

key: "getGroupLabel",
value: function getGroupLabel(row, formulaRow, linkRow, column, dateGranularity, geoGranularity, value) {
value: function getGroupLabel(cellValue, formulaRow, linkRow, column, dateGranularity, geoGranularity, value) {
var type = column.type,
key = column.key,
data = column.data;
var cellValue = row[key];

@@ -95,2 +94,6 @@ switch (type) {

{
if (!dateGranularity) {
return (0, _dtableStore.getDateDisplayString)(cellValue);
}
return (0, _dtableStore.getDateByGranularity)(cellValue, dateGranularity);

@@ -128,3 +131,3 @@ }

if (!formulaRow) return "";
var formulaCellValue = formulaRow[key];
var formulaCellValue = formulaRow[key] || cellValue;

@@ -150,7 +153,7 @@ var _ref = data || {},

if (geo_format === 'country_region' || geo_format === 'lng_lat') {
return (0, _dtableStore.getGeolocationDisplayString)(row[column.key], data);
if (geo_format === 'country_region' || geo_format === 'lng_lat' || !geoGranularity) {
return (0, _dtableStore.getGeolocationDisplayString)(cellValue, data);
}
return row[column.key] ? row[column.key][geoGranularity] : null;
return cellValue ? cellValue[geoGranularity] : null;
}

@@ -161,3 +164,3 @@

if (!linkRow) return null;
var linkCellValue = linkRow[key];
var linkCellValue = linkRow[key] || cellValue;
return linkCellValue || [];

@@ -164,0 +167,0 @@ }

{
"name": "dtable-sdk",
"version": "0.0.91",
"version": "0.0.92",
"description": "dtable sdk",

@@ -22,3 +22,3 @@ "main": "./dist/index.js",

"axios": "^0.19.0",
"dtable-store": "^2.1.12",
"dtable-store": "^2.2.12",
"form-data": "^3.0.0"

@@ -25,0 +25,0 @@ },

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