versatile-tree
Advanced tools
Comparing version 1.3.10 to 1.3.11
@@ -207,2 +207,8 @@ /** | ||
/** | ||
* Returns the number of children for this node. | ||
* | ||
* @returns The number of children for this node. | ||
*/ | ||
getChildCount(): number; | ||
/** | ||
* Returns true if this node has children. False otherwise. | ||
@@ -209,0 +215,0 @@ * |
@@ -325,2 +325,10 @@ "use strict"; | ||
/** | ||
* Returns the number of children for this node. | ||
* | ||
* @returns The number of children for this node. | ||
*/ | ||
getChildCount() { | ||
return this.getChildren().length; | ||
} | ||
/** | ||
* Returns true if this node has children. False otherwise. | ||
@@ -331,3 +339,3 @@ * | ||
hasChildren() { | ||
return this.children.length > 0; | ||
return this.getChildCount() > 0; | ||
} | ||
@@ -334,0 +342,0 @@ /** |
{ | ||
"name": "versatile-tree", | ||
"version": "1.3.10", | ||
"version": "1.3.11", | ||
"coreVersion": "3.0.9", | ||
@@ -5,0 +5,0 @@ "author": "Justin Mahar <contact@justinmahar.com>", |
@@ -104,2 +104,3 @@ <h2 align="center"> | ||
- [getChildren](#getchildren) | ||
- [getChildCount](#getchildcount) | ||
- [hasChildren](#haschildren) | ||
@@ -491,2 +492,15 @@ - [getFirstChild](#getfirstchild) | ||
#### getChildCount | ||
```ts | ||
getChildCount(): number | ||
``` | ||
Returns the number of children for this node. | ||
| Returns | | ||
| ------------------------------------- | | ||
| The number of children for this node. | | ||
--- | ||
#### hasChildren | ||
@@ -493,0 +507,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98679
1297
1080