import re


def check_for_function(function: str, data: str) -> bool:
    """ Checks for a function in javascript code

    function: the name of the function
    data: the javascript code

    returns: Whether the code contains the function
    """
    return bool(re.search(f'[^a-zA-Z]{function}[^a-zA-Z]', data))