Core Docs | Additional Modules Docs

sb.objects.infuse


@Description: Used to add properties from one object to another. If you have globals enabled you can just call infuse on any object or constructor and pass teh object to copy the properties from.
@File: sb.js
@Example:
var boy = {
        name : 'paul'
    };

    var otherBoy : {
        eats : function(){
            alert('yum');
        }
    }
    //copies eat function to boy object
    sb.objects.infuse(otherBoy, boy);
    //or with globals enabled
    boy.infuse(otherBoy);