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

Reduce bundle size #117

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ArtiomTr
Copy link
Contributor

Reduced bundle size by removing code duplication. Generates the same hashes as the previous version. Changes:

  1. Separated functions by produced value patterns.
    1. literals - write just <name> to the output stream.
    2. stringifiableObjects - write <name>:<value.toString()> to the output stream.
    3. typedArray - write <name>: to the output stream and stringify as a normal array.
    4. setTypes - write set/map to the output stream by old rules.
  2. Created applyHashes function, which applies hasher function for all given types.

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.

1 participant