X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fregexp.ts;h=cfc2be4882523e7c5dbd20c56903801a059b0df6;hb=e030bfb59dd5ee65f20a64686ec9b22ca39f70ae;hp=2336654b0d3ee73421593ad9a9d5083e60df7c35;hpb=f7cc67b455a12ccae9b0ea16876d166720364357;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/regexp.ts b/server/helpers/regexp.ts index 2336654b0..cfc2be488 100644 --- a/server/helpers/regexp.ts +++ b/server/helpers/regexp.ts @@ -1,8 +1,8 @@ // Thanks to https://regex101.com function regexpCapture (str: string, regex: RegExp, maxIterations = 100) { + const result: RegExpExecArray[] = [] let m: RegExpExecArray let i = 0 - let result: RegExpExecArray[] = [] // tslint:disable:no-conditional-assignment while ((m = regex.exec(str)) !== null && i < maxIterations) {