-
-
Save perguth/1084d69e3afac97d4e18 to your computer and use it in GitHub Desktop.
Merge all objects but ignore falsy values. See: https://speakerdeck.com/vjeux/react-css-in-js @react, @css
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
function m(...args) { | |
let res = {} | |
for (let i = 0; i < args.length; ++i) | |
if (args[i]) Object.assign(res, args[i]) | |
return res | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment