diff options
Diffstat (limited to 'node_modules/hosted-git-info/README.md')
-rw-r--r-- | node_modules/hosted-git-info/README.md | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/node_modules/hosted-git-info/README.md b/node_modules/hosted-git-info/README.md index ebf40a2ab..55b5dbcbb 100644 --- a/node_modules/hosted-git-info/README.md +++ b/node_modules/hosted-git-info/README.md @@ -61,7 +61,7 @@ eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme` * info.https() -eg, `https://github.com/npm/hosted-git-info.git` +eg, `git+https://github.com/npm/hosted-git-info.git` * info.sshurl() @@ -75,6 +75,23 @@ eg, `git@github.com:npm/hosted-git-info.git` eg, `npm/hosted-git-info` +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString() + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + + ## Supported hosts Currently this supports Github, Bitbucket and Gitlab. Pull requests for |