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

@enotes/groot

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enotes/groot - npm Package Compare versions

Comparing version 1.0.7-beta to 1.1.0

2

package.json
{
"name": "@enotes/groot",
"description": "Groot, a content tree.",
"version": "1.0.7-beta",
"version": "1.1.0",
"main": "src/groot.js",

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

@@ -177,2 +177,27 @@ 'use strict';

/**
* Gets a collection of this leaf's ancestors, starting
* with the closest ancestor and ending with the furthest.
* If inverse=true, then the order will be reversed.
* @param {Boolean} inverse - inverse the order of ancestors
* @return {Array.<Leaf>}
*/
getAncestors: function (inverse = false) {
const ancestors = [];
let leaf = this,
parent = leaf.getParent();
while (parent) {
if (inverse) {
// furthest to closest
ancestors.unshift(parent);
} else {
// closest to furthest
ancestors.push(parent);
}
leaf = parent;
parent = leaf.getParent();
}
return ancestors;
},
/**
* Does this instance have any children?

@@ -179,0 +204,0 @@ * @returns {Boolean}

@@ -368,3 +368,14 @@ 'use strict';

const listItem = this._findListItem(sourceLeaf);
// recursively render ancestors that have not yet
// been rendered
const ancestorLeafs = sourceLeaf.getAncestors(true);
while (ancestorLeafs.length) {
const ancestorLeaf = ancestorLeafs.shift();
if (ancestorLeaf.isExpanded) {
continue;
}
ancestorLeaf.toggle();
const ancestorListItem = this._findListItem(ancestorLeaf);
this._renderLeaf(ancestorListItem, ancestorLeaf);
}

@@ -382,2 +393,3 @@ const EXPAND_ARGS = {

const listItem = this._findListItem(sourceLeaf);
this._renderLeaf(listItem, sourceLeaf);

@@ -384,0 +396,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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