JSPM

@igor.dvlpr/git-repo-url

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q18163F
  • License MIT

๐ŸŒ Gets the origin URL of the current, local Git repository. ๐Ÿ—บ๏ธ

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


๐ŸŒ Gets the origin URL of the current, local Git repository. ๐Ÿ—บ๏ธ



๐Ÿ’– 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! ๐Ÿ™๐Ÿ˜Š


Donate to igorskyflyer

@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.


@igor.dvlpr/recursive-readdir

๐Ÿ“– Provides recursive readdir() and readdirSync() functions. ๐Ÿ“


@igor.dvlpr/is-rootdir

๐Ÿ”ผ 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. ๐ŸŽจ


@igor.dvlpr/strip-headings

โ›ธ Strips Markdown headings!๐Ÿน


@igor.dvlpr/duoscribi

โœ’ DรบรถScrรญbรฎ allows you to convert letters with diacritics to regular letters. ๐Ÿค“



๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Author

Created by Igor Dimitrijeviฤ‡ (@igorskyflyer).