def jsModuleDeclaration(name):
    """
    Generate Javascript for a module declaration.
    """
    var = ''
    if '.' not in name:
        var = 'var '
    return '%s%s = {"__name__": "%s"};' % (var, name, name)