simple-tree-utils
Advanced tools
Comparing version
@@ -5,4 +5,10 @@ ### Changelog | ||
#### [2.3.1](https://github.com/Raiper34/simple-tree-utils/compare/2.3.0...2.3.1) | ||
- fix(method): make helper _add method as private [`cc690de`](https://github.com/Raiper34/simple-tree-utils/commit/cc690ded79c3909ddb8f76afaea8170b719f1616) | ||
#### [2.3.0](https://github.com/Raiper34/simple-tree-utils/compare/2.2.0...2.3.0) | ||
> 1 February 2025 | ||
- feat(addunshift): addUnshift method to add item as first child, instead of last one [`59d761b`](https://github.com/Raiper34/simple-tree-utils/commit/59d761b286a95b4d7e459aabd716ba84ce13e918) | ||
@@ -9,0 +15,0 @@ |
@@ -119,3 +119,3 @@ /** | ||
*/ | ||
_add(operation: 'push' | 'unshift', tree: any[], parentId: any, childData: any, ...anotherChildData: any[]): void; | ||
private _add; | ||
/** | ||
@@ -122,0 +122,0 @@ * Method to update node by id with given data in tree (mutable operation!) |
{ | ||
"name": "simple-tree-utils", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Simple Tree Utils is the library to convert and manipulate with tree-like structures.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -194,3 +194,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
*/ | ||
_add(operation: 'push' | 'unshift', tree: any[], parentId: any, childData: any, ...anotherChildData: any[]): void { | ||
private _add(operation: 'push' | 'unshift', tree: any[], parentId: any, childData: any, ...anotherChildData: any[]): void { | ||
if (parentId == null) { | ||
@@ -197,0 +197,0 @@ tree[operation](childData, ...anotherChildData); |
125941
0.13%