tsdoc test

This commit is contained in:
2020-05-07 19:22:16 +02:00
parent a491b86947
commit 6e53d8d260
2 changed files with 60 additions and 3 deletions

View File

@ -1,3 +1,9 @@
/**
* removes invalid characters from a string and throws an error
* if left with an empty string
*
* @param name - name to check and transform
*/
function validate_name (name: string): string {
const new_name = name
.replace (/[^a-z0-9]/giu, '')