Skip to content

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