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

treetabular

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treetabular - npm Package Compare versions

Comparing version 3.5.2 to 3.6.0

5

CHANGELOG.md
## treetabular
3.6.0 / 2020-01-27
==================
* Feature - Improve filtering performance #24
3.5.2 / 2019-01-02

@@ -4,0 +9,0 @@ ==================

16

dist/filter.js

@@ -26,2 +26,6 @@ 'use strict';

// build up a cache of parent ids and whether their child rows should show
// to reduce the amount of lookups for performance
var parentCache = {};
return rows.filter(function (row, index) {

@@ -32,7 +36,17 @@ if (typeof row[parentField] === 'undefined' || row[parentField] === null) {

var parentVal = parentCache[row[parentField]];
if (parentVal === false || parentVal === true) {
return parentVal;
}
var parents = (0, _getParents2.default)({ index: index, idField: idField, parentField: parentField })(rows);
return parents.filter(function (parent) {
// if all the rows parents are showing then we know that the row should should
var rowShouldShow = parents.filter(function (parent) {
return parent[fieldName];
}).length === parents.length;
parentCache[row[parentField]] = rowShouldShow;
return rowShouldShow;
});

@@ -39,0 +53,0 @@ };

2

package.json
{
"name": "treetabular",
"version": "3.5.2",
"version": "3.6.0",
"description": "Tree utilities",

@@ -5,0 +5,0 @@ "scripts": {

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