build/W.node.js
function bind( fn, scope ) {
    var bound, args;
    if ( fn.bind === nativeBind && nativeBind ) return nativeBind.apply( fn, Array.prototype.slice.call( arguments, 1 ) );
    args = Array.prototype.slice.call( arguments, 2 );
    // @todo: don't link this
    bound = function() {
        if ( !(this instanceof bound) ) return fn.apply( scope, args.concat( Array.prototype.slice.call( arguments ) ) );
        W.ctor.prototype = fn.prototype;
        var self = new ctor();
        var result = fn.apply( self, args.concat( Array.prototype.slice.call( arguments ) ) );
        if ( Object( result ) === result ) return result;
        return self;
    };
    return bound;
}
function bind( fn, scope ) {
    var bound, args;
    if ( fn.bind === nativeBind && nativeBind ) return nativeBind.apply( fn, Array.prototype.slice.call( arguments, 1 ) );
    args = Array.prototype.slice.call( arguments, 2 );
    // @todo: don't link this
    bound = function() {
        if ( !(this instanceof bound) ) return fn.apply( scope, args.concat( Array.prototype.slice.call( arguments ) ) );
        W.ctor.prototype = fn.prototype;
        var self = new ctor();
        var result = fn.apply( self, args.concat( Array.prototype.slice.call( arguments ) ) );
        if ( Object( result ) === result ) return result;
        return self;
    };
    return bound;
}
function bind ( fn , scope ) { var bound , args ; if ( fn . bind === nativeBind && nativeBind ) return nativeBind . apply ( fn , Array . prototype . slice . call ( arguments , 1 ) ) ; args = Array . prototype . slice . call ( arguments , 2 ) ; // @todo: don't link this bound = function ( ) { if ( ! ( this instanceof bound ) ) return fn . apply ( scope , args . concat ( Array . prototype . slice . call ( arguments ) ) ) ; W . ctor . prototype = fn . prototype ; var self = new ctor ( ) ; var result = fn . apply ( self , args . concat ( Array . prototype . slice . call ( arguments ) ) ) ; if ( Object ( result ) === result ) return result ; return self ; } ; return bound ; }
Bind function to scope. Useful for events.
@param   {Function}   fn     function
@param   {Object}     scope    Scope of the function to be executed in
@example $("div").fadeIn(100, W.bind(this, this.transitionDidFinish));
Bind function to scope . Useful for events .