https://github.com/reciprocity/ggrc-core/blob/develop/src/ggrc/assets/javascripts/models/mixins.js
I wrote this specifically for Model classes but it should be easy to extend to most can.Construct types.