'Dumps a dict into a javascript-like object format
Note that this should probably only be used for the specific case of
the var_dict down below, where the items are in a very specific format.
In particular, this function specifically doesn\'t quote either the key
or the value when dumping, because it expects that they key is a
javascript-like variable name, and the value is a valid javascript
expression.
Example:
{ "NAME": "NAME", "TEXT": "TEXT" }
=> "{NAME: NAME, TEXT: TEXT}"'

@staticmethod
def _javascript_dumps(d):

    return ('{%s}' % ',    '.join((('%s:    %s' % (k, v)) for (k, v) in d.iteritems())))
