@chanyuxi/utils 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,10 @@ export interface ITreeNode<T> {
2
2
  value: T;
3
3
  }
4
4
 
5
- export class BinaryTreeNode<T> extends ITreeNode<T> {
6
- l: IBinaryTreeNode<T> | null;
7
- r: IBinaryTreeNode<T> | null;
5
+ export class BinaryTreeNode<T> implements ITreeNode<T> {
6
+ value: T;
7
+ l: BinaryTreeNode<T> | null;
8
+ r: BinaryTreeNode<T> | null;
8
9
  }
9
10
 
10
11
  export class Queue<T> {
@@ -1 +1 @@
1
- class t{constructor(){this.data=[]}peek(){return this.data[0]}pop(){return 0===this.data.length?null:this.data.shift()}push(t){this.data.push(t)}size(){return this.data.length}}export{t as Queue};
1
+ class Queue{constructor(){this.data=[]}peek(){var t;return null!==(t=this.data[0])&&void 0!==t?t:null}pop(){var t;return null!==(t=this.data.shift())&&void 0!==t?t:null}push(t){this.data.push(t)}size(){return this.data.length}}export{Queue};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chanyuxi/utils",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "author": "Chan-Yuxi <2438149743@qq.com> (https://github.com/Chan-Yuxi)",
5
5
  "license": "ISC",
6
6
  "description": "Collection of practical tools for personal use",