Created
February 6, 2018 12:28
-
-
Save loke-dev/63b9ef894a7e9d8adfc7ee32e87ddeea to your computer and use it in GitHub Desktop.
Object stuff
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
_extractSummary(events, keys) { | |
const extract = () => keys.reduce((obj, key) => (obj[key]=events[key], obj), {}) | |
return keys.map(e => ({ type: e, value: extract(events, keys)[e] })); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment