def strip_js_comments(string):
    parts = re_js_comments.findall(string)
    # Stripping the whitespaces is, of course, optional, but the columns are fucked up anyway
    # with the comments being removed and it doesn't break things.
    return ''.join(x[0].strip(' ') for x in parts)

###############################################################################


# Define the prototype loader class and the loaders for the separate data types
Originally obtained from Stackoverflow this function strips JavaScript
dataset/ETHPy150Open SublimeText/PackageDev/fileconv/loaders.py/strip_js_comments