Created
April 25, 2015 07:45
-
-
Save badsyntax/b2d9c843236960f145e7 to your computer and use it in GitHub Desktop.
es6 mixin
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
export default (Parent, ...mixins) => { | |
class Mixed extends Parent {} | |
Object.assign(Mixed.prototype, ...mixins); | |
return Mixed; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment