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

Refactor #115

Merged
merged 26 commits into from
May 4, 2020
Merged

Refactor #115

merged 26 commits into from
May 4, 2020

Conversation

mnater
Copy link
Owner

@mnater mnater commented May 1, 2020

Refactoring goals:

  • reduce code size
  • remove object-injection where possible

*   enhance event registering
*   enhance createDOMHyphenator()
*   enhance registerSubstitutions (remove eachKey())

[skip travis-ci]
feat: Subject
refactor: convert all user settings to Map

Problem:
Object value access with brackets may induce some security issues.
https://github.com/nodesecurity/eslint-plugin-security/blob/master/docs/the-dangers-of-square-bracket-notation.md

Solution:
Convert all values in H.setup to Maps.

Notes:
[skip travis-ci]
[skip travis-ci]
[skip travis-ci]
[skip travis-ci]
refactor: make 990d0d5 not breaking

Problem:
Making H.hyphenators a Map required API changes
(calling Hyphenopoly.hyphenators.get("<lang>") instead of
Hyphenopoly.hyphenators.<lang>

Solution:
Put a Proxy before the hyphenators Map allowing dot-getters

[skip travis-ci]
@mnater mnater merged commit 361b16f into master May 4, 2020
@mnater mnater deleted the refactor branch May 4, 2020 20:27
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.

None yet

1 participant