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

Solution #3907

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

Conversation

ihorkorshylivskyi
Copy link

No description provided.

}
break;

case 'clear':
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For "clear", it's easier to just create a new empty object instead of a copy of the previous one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll take it into account

}
break;

case 'removeProperties':
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For "removeProperties", you can simply delete the keys in the copy instead of creating a new object for each change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks

Copy link

@Pirgei Pirgei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, your code works, but I left comments on how it can be improved

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.

3 participants