def is_match(source, *patterns):
    """
    gets a value indicating that given file name end, matches with any of given patterns.

    :param str source: source file path.

    :param str patterns: file name end pattern. for example it could
                         be `'.py', '.html'`. it will match all file
                         names if no pattern is provided.

    :rtype: bool
    """
    if len(patterns) <= 0:
        return True
    for pattern in patterns:
        if source.lower().endswith(pattern.lower()):
            return True
    return False
