Commit 871dd09
committed
refactor: Make main function exportable and callable
This change refactors the `index.js` file to allow the `main` function to be both exportable and callable by other modules. The original code executed `main` directly when the script was run as the main module. This behavior has been removed to improve modularity and testability. Now the `main` function can be imported and called explicitly, enabling better integration with testing frameworks and other parts of the application.
The conditional execution `if (require.main === module) { main(); }` has been removed.1 parent 557cf98 commit 871dd09
1 file changed
+0
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
0 commit comments