lib/mixin.js
function _createProxyMethods(proxyMethods, hostObject) {
    check(proxyMethods, Match.Optional(Match.OneOf([String], Match.ObjectHash(String))));

    // creating and binding proxy methods on the host object
    if (Array.isArray(proxyMethods))
        proxyMethods.forEach(function(methodName) {
            // method called this way to allow using _createProxyMethods with objects
            // that are not inheriting from Mixin
            _createProxyMethod.call(this, methodName, methodName, hostObject);
        }, this);
    else
        for (var proxyMethodName in proxyMethods) {
            // method called this way to allow using _createProxyMethods with objects
            // that are not inheriting from Mixin
            if (proxyMethods.hasOwnProperty(proxyMethodName)) {
                var mixinMethodName = proxyMethods[proxyMethodName];
                _createProxyMethod.call(this, proxyMethodName, mixinMethodName, hostObject);
            }
        }
}
function _createProxyMethods(proxyMethods, hostObject) {
    check(proxyMethods, Match.Optional(Match.OneOf([String], Match.ObjectHash(String))));

    // creating and binding proxy methods on the host object
    if (Array.isArray(proxyMethods))
        proxyMethods.forEach(function(methodName) {
            // method called this way to allow using _createProxyMethods with objects
            // that are not inheriting from Mixin
            _createProxyMethod.call(this, methodName, methodName, hostObject);
        }, this);
    else
        for (var proxyMethodName in proxyMethods) {
            // method called this way to allow using _createProxyMethods with objects
            // that are not inheriting from Mixin
            if (proxyMethods.hasOwnProperty(proxyMethodName)) {
                var mixinMethodName = proxyMethods[proxyMethodName];
                _createProxyMethod.call(this, proxyMethodName, mixinMethodName, hostObject);
            }
        }
}
function _createProxyMethods ( proxyMethods , hostObject ) { check ( proxyMethods , Match . Optional ( Match . OneOf ( [ String ] , Match . ObjectHash ( String ) ) ) ) ; // creating and binding proxy methods on the host object if ( Array . isArray ( proxyMethods ) ) proxyMethods . forEach ( function ( methodName ) { // method called this way to allow using _createProxyMethods with objects // that are not inheriting from Mixin _createProxyMethod . call ( this , methodName , methodName , hostObject ) ; } , this ) ; else for ( var proxyMethodName in proxyMethods ) { // method called this way to allow using _createProxyMethods with objects // that are not inheriting from Mixin if ( proxyMethods . hasOwnProperty ( proxyMethodName ) ) { var mixinMethodName = proxyMethods [ proxyMethodName ] ; _createProxyMethod . call ( this , proxyMethodName , mixinMethodName , hostObject ) ; } } }
Creates proxied methods of Mixin subclass on host object.

@param {Hash[String]|Array[String]} proxyMethods map of names of methods, key - proxy method name, value - mixin method name. Can be array.
@param {Object} hostObject an optional reference to the host object; if not specified the host object passed to constructor wil be used. It allows to use the same instance of Mixin on two host objects.
Creates proxied methods of Mixin subclass on host object .