Basically, I found the javascript library where the API uses some object literal. I am trying to figure out how to separate them on different javascript files for easier reading. There is the file that has like 30 different functions nested in a single object... I am trying to separate them. The example below is simplified to show my point.
BasicGame.Game.prototype = {
var1: function () { blah blah},
var2: function () { blah blah},
var3: function () { blah blah},
var4: function () { blah blah}
}
How an you take out var3 and var4 and put in them in another object literal that shares same Basic.Game object? If I wrote BasicGame.Game again, it would overwrite the original object literal.