so something like...
Function = function (room) { if (global.Cache.rooms[room].FunctionName === undefined) { if (global.Cache.rooms[room] === undefined) { if (global.Cache.rooms === undefined) { if (global.Cache === undefined) { global.Cache = {}; } global.Cache.rooms = {}; } global.Cache.rooms[room] = {}; } global.Cache.rooms[room].FunctionName = FunctionCode; } return global.Cache.rooms[room].FunctionName; }
? is there a way I could format that better? more readable etc.?