Class Index | File Index

Classes


Namespace util.helpers

Various utility functions that don't have anywhere else to go.
Defined in: <js/util/helpers.js>.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
util.helpers.deepCopy(obj)
Clones an object.
<static>  
util.helpers.error(error, req)
Display a whole-page error message to the user by calling either views.leagueError or views.globalError as appropriate.
<static>  
util.helpers.resetG()
Delete all the things from the global variable g that are not stored in league databases.
Namespace Detail
util.helpers
Method Detail
<static> util.helpers.deepCopy(obj)
Clones an object. Taken from http://stackoverflow.com/a/3284324/786644
Parameters:
{Object} obj
Object to be cloned.

<static> util.helpers.error(error, req)
Display a whole-page error message to the user by calling either views.leagueError or views.globalError as appropriate.
Parameters:
{string} error
Text of the error message to be displayed.
{Object} req
Optional Davis.js request object, containing the callback function and any other metadata

<static> util.helpers.resetG()
Delete all the things from the global variable g that are not stored in league databases. This is used to clear out values from other leagues, to ensure that the appropriate values are updated in the database when calling db.setGameAttributes.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 01 2013 11:45:19 GMT-0500 (EST)