-
Notifications
You must be signed in to change notification settings - Fork 31
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
Target es5 #11
base: master
Are you sure you want to change the base?
Target es5 #11
Conversation
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 |
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. |
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! |
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 haveassign
in ES5, I've opted to importassignIn
from 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.