data-structure-typed 1.36.5 → 1.36.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.
package/CONTRIBUTING.md CHANGED
@@ -6,6 +6,19 @@
6
6
  - Don't forget to run `npm run lint` and `npm test` before submitting pull requests.
7
7
  - Make sure that **100%** of your code is covered by tests.
8
8
 
9
+ **Contributing new features **
10
+
11
+ - To ensure that there are no conflicts when merging the branch into the main branch,
12
+ - it is necessary to perform the following steps each time new development is going to be conducted on non-main branches:
13
+ - `git pull`,
14
+ - `git rebase main`
15
+ - resolve conflicts before continuing the development.
16
+ - After new features developed
17
+ - `git add .`
18
+ - `git commit -m [rbtree] features` (`rbtree` needs to be replaced by the module you have modified,
19
+ - `features` must be replaced by the detailed description about the features you implemented)
20
+ - `git push`
21
+ - click the `New pull request` on Github https://github.com/zrwusa/data-structure-typed/branches
9
22
 
10
23
  **Contributing New Data Structures**
11
24
 
package/README.md CHANGED
@@ -907,3 +907,4 @@ optimal approach to data structure design.
907
907
  </tr>
908
908
  </tbody>
909
909
  </table>
910
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "data-structure-typed",
3
- "version": "1.36.5",
3
+ "version": "1.36.6",
4
4
  "description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -1,29 +0,0 @@
1
- #!/bin/bash
2
-
3
- # iterate the directory to rename and clear content of files
4
- rename_and_clear_files() {
5
- local directory="$1"
6
- local extension="$2"
7
- local new_prefix="$3"
8
-
9
- for file in "$directory"/*; do
10
- if [ -d "$file" ]; then
11
- rename_and_clear_files "$file" "$extension" "$new_prefix"
12
- elif [ -f "$file" ] && [[ "$file" == *"$extension" ]]; then
13
- filename=$(basename "$file" "$extension")
14
- new_name="$directory/${filename}${new_prefix}${extension}"
15
- mv "$file" "$new_name"
16
- echo "Renamed $file to $new_name"
17
- > "$new_name" # clear content of file
18
- fi
19
- done
20
- }
21
-
22
- # check if directory, extension and prefix were provided
23
- if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
24
- echo "Usage: $0 <directory> <extension> <new_prefix>"
25
- exit 1
26
- fi
27
-
28
- # evoke the recursive function to rename and clear files
29
- rename_and_clear_files "$1" "$2" "$3"