Package Exports
- @igor.dvlpr/git-repo-url
- @igor.dvlpr/git-repo-url/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@igor.dvlpr/git-repo-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Git Repo URL
๐ Support further development
I work hard for every project, including this one
and your support means a lot to me!
Consider buying me a coffee. โ
Thank you for supporting my efforts! ๐๐
![]()
@igorskyflyer
๐ Table of contents
๐ต๐ผ Usage
Install it by executing:
npm i '@igor.dvlpr/git-repo-url'
๐คน๐ผ API
getRepoUrl()
Asynchronously gets the URL of a local directory if it is a Git repository.
options
- optional object with options:
directory
- sets the current working directory, otherwise the current directory will be used instead.
Will throw an error if the passed directory is not valid or does not exist.
Returns the URL if the directory is a Git repository, otherwise an empty string.
getRepoUrlSync()
Synchronously gets the URL of a local directory if it is a Git repository.
options
- optional object with options:
directory
- sets the current working directory, otherwise the current directory will be used instead.
Will throw an error if the passed directory is not valid or does not exist.
Returns the URL if the directory is a Git repository, otherwise an empty string.
โจ Examples
example.ts
import { getRepoUrlSync } from '@igor.dvlpr/git-repo-url'
console.log(getRepoUrlSync()) // prints e.g. 'https://github.com/igorskyflyer/npm-duoscribi'
๐ Changelog
๐ The changelog is available here: CHANGELOG.md.
๐ชช License
Licensed under the MIT license which is available here, MIT license.
๐งฌ Related
๐ Provides recursive readdir() and readdirSync() functions. ๐
๐ผ Provides a way to check if the given path is the root drive/directory. โ
@igor.dvlpr/vscode-folderpicker
โจ Provides a custom Folder Picker API + UI for Visual Studio Code. ๐จ
โธ Strips Markdown headings!๐น
โ DรบรถScrรญbรฎ allows you to convert letters with diacritics to regular letters. ๐ค
๐จ๐ปโ๐ป Author
Created by Igor Dimitrijeviฤ (@igorskyflyer).