Checks if a database exists in InfluxDB.

    name
        Name of the database to check.

    CLI Example:

    .. code-block:: bash

        salt '*' influxdb.db_exists <name>

def db_exists(name, **client_args):
    '''
    Checks if a database exists in InfluxDB.

    name
        Name of the database to check.

    CLI Example:

    .. code-block:: bash

        salt '*' influxdb.db_exists <name>
    '''
    if name in [db['name'] for db in list_dbs(**client_args)]:
        return True

    return False