Skip to content
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

Expose Converter class as primary export #9

Closed
neocotic opened this issue Oct 27, 2017 · 2 comments
Closed

Expose Converter class as primary export #9

neocotic opened this issue Oct 27, 2017 · 2 comments

Comments

@neocotic
Copy link
Owner

neocotic commented Oct 27, 2017

Currently, importing this package provides access to the following methods:

The version property is also exposed.

I would like to simplify this further by simply directly exporting the Converter class and move the above methods to static methods on the Converter class. The createConverter method would become redundant, however, it will continue to be used by the static methods as it can be stubbed for unit testing purposes and I'm not sure how easy it is to stub constructors themselves.

The version property is also exposed, which I'd like to make a static constant on the Converter class. Since 0.2.0 will already include a breaking change (#4), I'll take this opportunity to rename this property to VERSION.

This should hopefully simplify the API even further.

@neocotic neocotic added this to the 0.2.0 milestone Oct 27, 2017
@neocotic neocotic self-assigned this Oct 27, 2017
@neocotic
Copy link
Owner Author

Since the createConverter will be primarily intended for internal use only after these changes, I'll remove it from the README and replace it will details on using a Converter instance instead.

@neocotic
Copy link
Owner Author

neocotic commented Nov 3, 2017

FYI This enhancement will be reverted in 0.3.0 to be compatible with #17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant