Merge pull request #649 from silentrald/bugfix/non-standard-zip-extraction

[bugfix] handle extracting non-conformant zip files
This commit is contained in:
MathieuG-P
2024-11-17 13:10:15 +01:00
committed by GitHub
22 changed files with 720 additions and 210 deletions
+5
View File
@@ -11,3 +11,8 @@ export function findHashInString(str: string, algorithm: keyof typeof HashAlgori
const match = regex.exec(str);
return match ? match[0] : undefined;
}
export function escapeRegExp(str: string): string {
// Regex taken from lodash escapeRegExp function
return str.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&');
}