Get online URL of file (Github, GitLab, Bitbucket...)


Keywords
git
License
MIT
Install
npm install git-urls@2.0.0

Documentation

npm AppVeyor

git-urls

Get online link of file with git remote URL(support Github, GitLab, Bitbucket, VSTS, DevOps)

Install

npm install git-urls

Usage example

import GitUrls from "git-urls";

const f = async () => {
    return await GitUrls.getUrlsAsync(__filename);
};

f().then(linkMap => {
    for (const [remoteName, link] of linkMap) {
        console.log(`${remoteName}: ${link}`);
    }
});