Created
July 28, 2020 16:42
-
-
Save chmelevskij/6f0ed2f7a28c7dba9d29c721cf098ab8 to your computer and use it in GitHub Desktop.
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
// from https://stackoverflow.com/a/47916931/3618387 | |
const destruct = (obj, ...keys) => | |
keys.reduce((a, c) => { a[c] = obj[c]; return a; }, {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment