refactor to const

This commit is contained in:
2017-10-26 15:24:10 +02:00
parent 4a94ce3038
commit 235f380139
19 changed files with 48 additions and 41 deletions

View File

@@ -24,13 +24,13 @@ export class GitRepo {
/* ---------------------------------------------- *
* ------------------ helpers ------------------- *
* ---------------------------------------------- */
let gitRegex = function (stringArg: string) {
let regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/
const gitRegex = function (stringArg: string) {
const regexString = /([a-zA-Z0-9\-\.]*)(?:\/|\:)([a-zA-Z0-9\-\.]*)(?:\/)([a-zA-Z0-9\-\.]*)(?:\.git)/
let regexMatches = regexString.exec(stringArg)
return regexMatches
}
let gitLink = function (hostArg: string, userArg: string, repoArg: string, tokenArg: string = '', linkTypeArg): string {
const gitLink = function (hostArg: string, userArg: string, repoArg: string, tokenArg: string = '', linkTypeArg): string {
let returnString
if (tokenArg !== '') {
tokenArg = tokenArg + '@'