Created
March 1, 2016 15:55
-
-
Save cicorias/166e01140b9a940308a4 to your computer and use it in GitHub Desktop.
an inherit using lodash - stolen from here; https://github.com/lodash/lodash/issues/663
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
_.mixin({ | |
'inherit': function(child, base, props) { | |
child.prototype = _.create(base.prototype, _.assign({ | |
'_super': base.prototype, | |
'constructor': child | |
}, props)); | |
return child; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment