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

simplify the code & improve performance . #26

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

Conversation

mhd-fettah
Copy link

using guard clause in two places so the if statement is easy to read which reduce code complexity ,
and refactoring the function to standard factory function where we dont need to create instance and add each function like 'instance.undo = function ()' instead we can do just 'undo()' this makes the code more readable

@mhd-fettah
Copy link
Author

using Object.assign

to mass assign values and improve performance .

@mhd-fettah
Copy link
Author

init and assign and short hand if .

@mhd-fettah mhd-fettah changed the title simplify generateInstance function simplify the code & improve performance . Nov 14, 2024
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