New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contrail/data-grouping

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/data-grouping - npm Package Compare versions

Comparing version

to
1.0.44

10

lib/data-group-generator/data-group-generator.js

@@ -13,3 +13,3 @@ "use strict";

let hasEmptyValues = false;
data.forEach((obj) => {
data.forEach(obj => {
if (!obj) {

@@ -44,3 +44,3 @@ return;

}
if (propertyTypeOptions.isDate && value) {
if (propertyTypeOptions.isDate && value && value !== '(empty)') {
const date = new Date(value);

@@ -54,3 +54,3 @@ value = date.toISOString().split('T')[0];

if (Array.isArray(value) && !groupMultiSelectInSeparateFrame) {
value.forEach((arrayValue) => {
value.forEach(arrayValue => {
map[arrayValue] = arrayValue;

@@ -121,6 +121,6 @@ if (!sortingArray.includes(arrayValue)) {

const sort = groupingProperty.sort || types_1.TypePropertySortOrder.ASCENDING;
const options = ((_e = (_d = groupingProperty.propertyDefinition) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.map((x) => x.value)) || null;
const options = ((_e = (_d = groupingProperty.propertyDefinition) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.map(x => x.value)) || null;
let distinctValues = this.getDistinctValues(data, rootIndex, slugIndex, rootAltIndex, slugAltIndex, groupMultiSelectInSeparateFrame, { sortOrder: sort, options }, propertyTypeOptions, displayItemsWithEmptyGroupingValues);
for (let val of distinctValues) {
const groupData = data.filter((obj) => {
const groupData = data.filter(obj => {
const objVal = util_1.ObjectUtil.getBySlugs(obj, rootIndex, slugIndex) || util_1.ObjectUtil.getBySlugs(obj, rootAltIndex, slugAltIndex);

@@ -127,0 +127,0 @@ if (val === '(empty)') {

{
"name": "@contrail/data-grouping",
"version": "1.0.43",
"version": "1.0.44",
"description": "Utilities and interfaces for grouping data into hierarchial data structures based on properties.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",