lib/mixin.js
function Mixin$$useWith(hostClass, instanceKey, mixinMethods) {
    check(mixinMethods, Match.Optional(Match.OneOf([String], Match.ObjectHash(String))));

    if (Array.isArray(mixinMethods)) {
        mixinMethods.forEach(function(methodName) {
            Mixin_addMethod.call(this, hostClass, instanceKey, methodName, methodName);
        }, this);
    } else {
        for (var hostMethodName in mixinMethods) {
            if (mixinMethods.hasOwnProperty(hostMethodName)) {
                var mixinMethodName = mixinMethods[hostMethodName];
                Mixin_addMethod.call(this, hostClass, instanceKey, mixinMethodName, hostMethodName);
            }
        }
    }
}
function Mixin$$useWith(hostClass, instanceKey, mixinMethods) {
    check(mixinMethods, Match.Optional(Match.OneOf([String], Match.ObjectHash(String))));

    if (Array.isArray(mixinMethods)) {
        mixinMethods.forEach(function(methodName) {
            Mixin_addMethod.call(this, hostClass, instanceKey, methodName, methodName);
        }, this);
    } else {
        for (var hostMethodName in mixinMethods) {
            if (mixinMethods.hasOwnProperty(hostMethodName)) {
                var mixinMethodName = mixinMethods[hostMethodName];
                Mixin_addMethod.call(this, hostClass, instanceKey, mixinMethodName, hostMethodName);
            }
        }
    }
}
function Mixin$$useWith ( hostClass , instanceKey , mixinMethods ) { check ( mixinMethods , Match . Optional ( Match . OneOf ( [ String ] , Match . ObjectHash ( String ) ) ) ) ; if ( Array . isArray ( mixinMethods ) ) { mixinMethods . forEach ( function ( methodName ) { Mixin_addMethod . call ( this , hostClass , instanceKey , methodName , methodName ) ; } , this ) ; } else { for ( var hostMethodName in mixinMethods ) { if ( mixinMethods . hasOwnProperty ( hostMethodName ) ) { var mixinMethodName = mixinMethods [ hostMethodName ] ; Mixin_addMethod . call ( this , hostClass , instanceKey , mixinMethodName , hostMethodName ) ; } } } }
Adds methods of Mixin subclass to host class prototype.

@param {Function} this Mixin subclass (not instance)
@param {Object} hostClass host object class; must be specified.
@param {String} instanceKey the name of the property the host class instance will store mixin instance on
@param {Hash[String]|Array[String]} mixinMethods map of names of methods, key - host method name, value - mixin method name. Can be array.
Adds methods of Mixin subclass to host class prototype .