Skip to content

Commit c3334df

Browse files
committed
refactor: Make main function exportable and callable by other modules
1 parent 871dd09 commit c3334df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ async function main() {
1313
}
1414
}
1515

16+
if (require.main === module) {
17+
main();
18+
}
19+
1620
module.exports = {
1721
main,
1822
};

0 commit comments

Comments
 (0)