bst-typed 1.38.1 → 1.38.3

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.
package/.eslintrc.js CHANGED
@@ -1,65 +1,65 @@
1
1
  module.exports = {
2
- 'extends': [
3
- 'plugin:@typescript-eslint/recommended',
4
- 'prettier'
5
- ],
6
- 'rules': {
7
- 'react/display-name': 'off',
8
- '@next/next/no-img-element': 'off',
9
- 'react/no-unescaped-entities': 'off',
10
- 'import/no-anonymous-default-export': 'off',
11
- '@typescript-eslint/no-unused-vars': 'error',
12
- '@typescript-eslint/ban-ts-comment': 'off',
13
- '@typescript-eslint/no-explicit-any': 'off',
14
- '@typescript-eslint/no-non-null-assertion': 'off',
15
- // add new line above comment
16
- 'lines-around-comment': [
17
- 'error',
18
- {
19
- 'beforeLineComment': false,
20
- 'beforeBlockComment': true,
21
- 'allowBlockStart': true,
22
- 'allowClassStart': true,
23
- 'allowObjectStart': true,
24
- 'allowArrayStart': true
25
- }
2
+ 'extends': [
3
+ 'plugin:@typescript-eslint/recommended',
4
+ 'prettier'
26
5
  ],
27
- // add new line above return
28
- 'newline-before-return': 'off',
29
- // add new line below import
30
- 'import/newline-after-import': [
31
- 'error',
32
- {
33
- 'count': 1
34
- }
6
+ 'rules': {
7
+ 'react/display-name': 'off',
8
+ '@next/next/no-img-element': 'off',
9
+ 'react/no-unescaped-entities': 'off',
10
+ 'import/no-anonymous-default-export': 'off',
11
+ '@typescript-eslint/no-unused-vars': 'error',
12
+ '@typescript-eslint/ban-ts-comment': 'off',
13
+ '@typescript-eslint/no-explicit-any': 'off',
14
+ '@typescript-eslint/no-non-null-assertion': 'off',
15
+ // add new line above comment
16
+ 'lines-around-comment': [
17
+ 'error',
18
+ {
19
+ 'beforeLineComment': false,
20
+ 'beforeBlockComment': true,
21
+ 'allowBlockStart': true,
22
+ 'allowClassStart': true,
23
+ 'allowObjectStart': true,
24
+ 'allowArrayStart': true
25
+ }
26
+ ],
27
+ // add new line above return
28
+ 'newline-before-return': 'off',
29
+ // add new line below import
30
+ 'import/newline-after-import': [
31
+ 'error',
32
+ {
33
+ 'count': 1
34
+ }
35
+ ],
36
+ '@typescript-eslint/ban-types': [
37
+ 'error',
38
+ {
39
+ 'extendDefaults': true,
40
+ 'types': {
41
+ '{}': false
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ 'plugins': [
47
+ 'import'
35
48
  ],
36
- '@typescript-eslint/ban-types': [
37
- 'error',
38
- {
39
- 'extendDefaults': true,
40
- 'types': {
41
- '{}': false
49
+ 'settings': {
50
+ 'import/parsers': {
51
+ '@typescript-eslint/parser': [
52
+ '.ts',
53
+ '.tsx'
54
+ ]
55
+ },
56
+ 'import/resolver': {
57
+ 'typescript': {
58
+ 'alwaysTryTypes': true,
59
+ 'project': [
60
+ './tsconfig.json'
61
+ ]
62
+ }
42
63
  }
43
- }
44
- ]
45
- },
46
- 'plugins': [
47
- 'import'
48
- ],
49
- 'settings': {
50
- 'import/parsers': {
51
- '@typescript-eslint/parser': [
52
- '.ts',
53
- '.tsx'
54
- ]
55
- },
56
- 'import/resolver': {
57
- 'typescript': {
58
- 'alwaysTryTypes': true,
59
- 'project': [
60
- './tsconfig.json'
61
- ]
62
- }
63
64
  }
64
- }
65
65
  }
package/.prettierrc.js CHANGED
@@ -1,16 +1,16 @@
1
1
  module.exports = {
2
- arrowParens: 'avoid',
3
- bracketSpacing: true,
4
- htmlWhitespaceSensitivity: 'css',
5
- insertPragma: false,
6
- bracketSameLine: false,
7
- jsxSingleQuote: true,
8
- printWidth: 120,
9
- proseWrap: 'preserve',
10
- quoteProps: 'as-needed',
11
- requirePragma: false,
12
- singleQuote: true,
13
- tabWidth: 2,
14
- trailingComma: 'none',
15
- useTabs: false
2
+ arrowParens: 'avoid',
3
+ bracketSpacing: true,
4
+ htmlWhitespaceSensitivity: 'css',
5
+ insertPragma: false,
6
+ bracketSameLine: false,
7
+ jsxSingleQuote: true,
8
+ printWidth: 120,
9
+ proseWrap: 'preserve',
10
+ quoteProps: 'as-needed',
11
+ requirePragma: false,
12
+ singleQuote: true,
13
+ tabWidth: 2,
14
+ trailingComma: 'none',
15
+ useTabs: false
16
16
  }
package/README.md CHANGED
@@ -7,25 +7,37 @@
7
7
  ![npm](https://img.shields.io/npm/v/bst-typed)
8
8
 
9
9
  # What
10
+
10
11
  ## Brief
11
- This is a standalone BST (Binary Search Tree) data structure from the data-structure-typed collection. If you wish to access more data structures or advanced features, you can transition to directly installing the complete [data-structure-typed](https://www.npmjs.com/package/data-structure-typed) package
12
12
 
13
+ This is a standalone BST (Binary Search Tree) data structure from the data-structure-typed collection. If you wish to
14
+ access more data structures or advanced features, you can transition to directly installing the
15
+ complete [data-structure-typed](https://www.npmjs.com/package/data-structure-typed) package
13
16
 
14
17
  # How
15
18
 
16
19
  ## install
20
+
17
21
  ### npm
22
+
18
23
  ```bash
19
24
  npm i bst-typed --save
20
25
  ```
26
+
21
27
  ### yarn
28
+
22
29
  ```bash
23
30
  yarn add bst-typed
24
31
  ```
32
+
25
33
  ### methods
34
+
26
35
  ![](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/methods-8bit/bst.png?raw=true)
36
+
27
37
  ### snippet
38
+
28
39
  #### TS
40
+
29
41
  ```typescript
30
42
  import {BST, BSTNode} from 'data-structure-typed';
31
43
  // /* or if you prefer */ import {BST, BSTNode} from 'bst-typed';
@@ -178,7 +190,9 @@ bfsNodes[0].id; // 2
178
190
  bfsNodes[1].id; // 12
179
191
  bfsNodes[2].id; // 16
180
192
  ```
193
+
181
194
  #### JS
195
+
182
196
  ```javascript
183
197
  const {BST, BSTNode} = require('data-structure-typed');
184
198
  // /* or if you prefer */ const {BST, BSTNode} = require('bst-typed');
@@ -332,7 +346,6 @@ bfsNodes[1].id; // 12
332
346
  bfsNodes[2].id; // 16
333
347
  ```
334
348
 
335
-
336
349
  ## API docs & Examples
337
350
 
338
351
  [API Docs](https://data-structure-typed-docs.vercel.app)
@@ -534,7 +547,6 @@ bfsNodes[2].id; // 16
534
547
  </tbody>
535
548
  </table>
536
549
 
537
-
538
550
  # Why
539
551
 
540
552
  ## Complexities
@@ -1,10 +1,13 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <coverage generated="1696760530950" clover="3.2.0">
3
- <project timestamp="1696760530951" name="All files">
4
- <metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2" elements="3" coveredelements="3" complexity="0" loc="1" ncloc="1" packages="1" files="1" classes="1"/>
5
- <file name="index.ts" path="/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts">
6
- <metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
7
- <line num="8" count="7" type="stmt"/>
8
- </file>
9
- </project>
3
+ <project timestamp="1696760530951" name="All files">
4
+ <metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="2"
5
+ coveredmethods="2" elements="3" coveredelements="3" complexity="0" loc="1" ncloc="1" packages="1"
6
+ files="1" classes="1"/>
7
+ <file name="index.ts" path="/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts">
8
+ <metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="2"
9
+ coveredmethods="2"/>
10
+ <line num="8" count="7" type="stmt"/>
11
+ </file>
12
+ </project>
10
13
  </coverage>
@@ -1,2 +1,96 @@
1
- {"/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts": {"path":"/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts","statementMap":{"0":{"start":{"line":8,"column":0},"end":{"line":8,"column":9}},"1":{"start":{"line":8,"column":9},"end":{"line":8,"column":18}},"2":{"start":{"line":8,"column":18},"end":{"line":8,"column":52}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":9},"end":{"line":8,"column":16}},"loc":{"start":{"line":8,"column":9},"end":{"line":8,"column":18}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":8,"column":18},"end":{"line":8,"column":21}},"loc":{"start":{"line":8,"column":18},"end":{"line":8,"column":52}}}},"branchMap":{},"s":{"0":1,"1":7,"2":5},"f":{"0":6,"1":4},"b":{}}
1
+ {
2
+ "/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts": {
3
+ "path": "/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts",
4
+ "statementMap": {
5
+ "0": {
6
+ "start": {
7
+ "line": 8,
8
+ "column": 0
9
+ },
10
+ "end": {
11
+ "line": 8,
12
+ "column": 9
13
+ }
14
+ },
15
+ "1": {
16
+ "start": {
17
+ "line": 8,
18
+ "column": 9
19
+ },
20
+ "end": {
21
+ "line": 8,
22
+ "column": 18
23
+ }
24
+ },
25
+ "2": {
26
+ "start": {
27
+ "line": 8,
28
+ "column": 18
29
+ },
30
+ "end": {
31
+ "line": 8,
32
+ "column": 52
33
+ }
34
+ }
35
+ },
36
+ "fnMap": {
37
+ "0": {
38
+ "name": "(anonymous_0)",
39
+ "decl": {
40
+ "start": {
41
+ "line": 8,
42
+ "column": 9
43
+ },
44
+ "end": {
45
+ "line": 8,
46
+ "column": 16
47
+ }
48
+ },
49
+ "loc": {
50
+ "start": {
51
+ "line": 8,
52
+ "column": 9
53
+ },
54
+ "end": {
55
+ "line": 8,
56
+ "column": 18
57
+ }
58
+ }
59
+ },
60
+ "1": {
61
+ "name": "(anonymous_1)",
62
+ "decl": {
63
+ "start": {
64
+ "line": 8,
65
+ "column": 18
66
+ },
67
+ "end": {
68
+ "line": 8,
69
+ "column": 21
70
+ }
71
+ },
72
+ "loc": {
73
+ "start": {
74
+ "line": 8,
75
+ "column": 18
76
+ },
77
+ "end": {
78
+ "line": 8,
79
+ "column": 52
80
+ }
81
+ }
82
+ }
83
+ },
84
+ "branchMap": {},
85
+ "s": {
86
+ "0": 1,
87
+ "1": 7,
88
+ "2": 5
89
+ },
90
+ "f": {
91
+ "0": 6,
92
+ "1": 4
93
+ },
94
+ "b": {}
95
+ }
2
96
  }
@@ -1,3 +1,60 @@
1
- {"total": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":3,"covered":3,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
2
- ,"/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":3,"covered":3,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
1
+ {
2
+ "total": {
3
+ "lines": {
4
+ "total": 1,
5
+ "covered": 1,
6
+ "skipped": 0,
7
+ "pct": 100
8
+ },
9
+ "statements": {
10
+ "total": 3,
11
+ "covered": 3,
12
+ "skipped": 0,
13
+ "pct": 100
14
+ },
15
+ "functions": {
16
+ "total": 2,
17
+ "covered": 2,
18
+ "skipped": 0,
19
+ "pct": 100
20
+ },
21
+ "branches": {
22
+ "total": 0,
23
+ "covered": 0,
24
+ "skipped": 0,
25
+ "pct": 100
26
+ },
27
+ "branchesTrue": {
28
+ "total": 0,
29
+ "covered": 0,
30
+ "skipped": 0,
31
+ "pct": "Unknown"
32
+ }
33
+ },
34
+ "/Users/revone/projects/data-structure-typed-individuals/bst-typed/src/index.ts": {
35
+ "lines": {
36
+ "total": 1,
37
+ "covered": 1,
38
+ "skipped": 0,
39
+ "pct": 100
40
+ },
41
+ "functions": {
42
+ "total": 2,
43
+ "covered": 2,
44
+ "skipped": 0,
45
+ "pct": 100
46
+ },
47
+ "statements": {
48
+ "total": 3,
49
+ "covered": 3,
50
+ "skipped": 0,
51
+ "pct": 100
52
+ },
53
+ "branches": {
54
+ "total": 0,
55
+ "covered": 0,
56
+ "skipped": 0,
57
+ "pct": 100
58
+ }
59
+ }
3
60
  }