(name: string)
| 75 | * Sanitizes a string for use as a path segment in a ZIP file. |
| 76 | */ |
| 77 | export function sanitizePathSegment(name: string): string { |
| 78 | return name.replace(/[^\p{L}\p{N}\-_]/gu, '-').replace(/-+/g, '-') |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Downloads a file to the user's device. |
no test coverage detected