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

chore/refactor: improvements for code base #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrysomallos
Copy link
Contributor

@chrysomallos chrysomallos commented Aug 17, 2021

This PR is to improve the code quality. I've fix some possible issues and make code more clean and safe against some issues. Fix some side effects in code when using reduce.

Changes:

  • DeckEncoder: optimize code
  • Base32: fix possible split issue and optimize code
  • Tests:
    • use assert.throws instead try catch construct
    • converted test deck codes into JSON
    • add Shurima deck in codes JSON
  • bump version

I hope it's okay and useful to you.

removed: Fix issue by using split to generade character arrays if the string contains unicode values: f.e. Unicode-Issue by using the spread operator.

src/Base32.js Outdated Show resolved Hide resolved
@chrysomallos chrysomallos changed the title chore/refactor: imporovements for code base chore/refactor: improvements for code base Aug 17, 2021
@chrysomallos chrysomallos force-pushed the chore/refactor branch 2 times, most recently from 70d006d to 3d75769 Compare August 27, 2021 17:32
* Base32: use object assign and map
* DeckEncoder: use reduce instead of push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants