* Sanitise a filename to remove path separators and other unsafe characters.
(name: string)
| 27 | * Sanitise a filename to remove path separators and other unsafe characters. |
| 28 | */ |
| 29 | function sanitizeFilename(name: string): string { |
| 30 | return name.replace(/[/\\:*?"<>|]/g, "_").replace(/\s+/g, "_"); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Save a buffer as an attachment file and return a ChannelAttachment descriptor. |
no outgoing calls
no test coverage detected