def dependencies_name_to_purl(dependencies):
    """
    Convert dependency names to the universal Package URL (PURL) format
    :param dependencies: Array of name@version like names
    """

    purl_dependencies = []

    for name, version in dependencies.items():
        # Remove ~ and ^ from versions
        clean_version = version.strip('~').strip('^')

        purl_dependencies.append(f'pkg:npm/{name}@{clean_version}')

    return purl_dependencies