Open
Conversation
Member
|
Hey @steveadams, super happy to have your contribution! Since we're already using lodash, this seems totally fine to me. We could also achieve the same result without lodash by using the spread operator but in the case, it doesn't make a huge difference. Just going to ping @kylefix to see if he has any input, as he was working on a few upgrades for the package recently |
Author
|
Ah, good eye. Using the spread operator makes a lot more sense here. Benchmarks suggest lodash will be slower (at least using _.merge vs Object.assign vs spread), and using native syntax is hard to beat. I'll go ahead and fix that. |
Author
|
I'm not sure if this PR is still applicable, but let me know what I can do to get it merged if it's still useful. Otherwise feel free to close it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there, this is my first attempt at a contribution. Please feel free to let me know exactly what I can do better if I've done anything wrong!
This is the simplest way I could find to change the target to ES5. Since
Object's prototype doesn't haveassignin ES5, I've opted to importassignInfrom lodash.The code compiles and the tests pass. There are deprecations and vulnerabilities in the compilation process which I've ignored as they seem out of scope for this issue.