Unified object assignment
This file contains 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
const assign = (target, key, value) => | |
Object.assign(target, Object(key) === key ? key : {[key]: value}); |
Author
bendc
commented
Jun 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment