Last active
June 18, 2016 17:52
-
-
Save wkronemeijer/ff15ea98bca28c5e3d12 to your computer and use it in GitHub Desktop.
A convenience function when you have a list of records and need only a member; index $1 with the property of choice and map it over the collection to obtain a list of members.
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 $1 = new Proxy({}, { | |
get(target, key) { | |
return x => x[key]; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: