diff --git a/app/coffee/utils.coffee b/app/coffee/utils.coffee index 3fe4d186..a4710cdf 100644 --- a/app/coffee/utils.coffee +++ b/app/coffee/utils.coffee @@ -31,5 +31,15 @@ bindOnce = (scope, attr, continuation) => delBind() if delBind +mixOf = (base, mixins...) -> + class Mixed extends base + + for mixin in mixins by -1 #earlier mixins override later ones + for name, method of mixin:: + Mixed::[name] = method + Mixed + + taiga = @.taiga taiga.bindOnce = bindOnce +taiga.mixOf = mixOf