-
Notifications
You must be signed in to change notification settings - Fork 38
Modularize itoolkit.js #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just looked at the file and with all the classes it looks like a good candidate for modularization. Just as a personal preference, when exporting a class from a file that only contains that class, I'm a fan of:
And then in the itoolkit.js (or wherever) you only need I think your proposed changes will be good to start refactoring itoolkit.js, looks like it needs a little TLC. |
SGTM. |
This seems fine to me, so long as we don't expect the exports to ever change or the user is never expected to import iConn directly - just through itoolkit. |
Open PR #28 for this issue @IBM/ibmi-open-source Feel free to review and comment |
Modularize itoolkit.js see issue #20
PR merged in branch v1.0-dev closing this issue |
I propose we modularize the classes and methods within itoolkit.js
Move The following to there own files:
For
xmlToJson
&__getClass
functionsI propose we create a new file called
utils.js
and move both there since both are commonly used across the classes in the project.Add exports to still allow access to all relevant Classes/Methods through itoolkit.js
In the end itoolkit.js will simply be our main entry point
@dmabupt @kadler @ThePrez @markdirish
What do you all think?
If approved I will submit a PR with these changes
The text was updated successfully, but these errors were encountered: