Archived
fix: regex es6 issue
This commit is contained in:
1 parent
31441131c4
commit
dd41581360
1 file changed
+2
-2
@@ -2,11 +2,11 @@ import fs from "fs";
|
|||||||
import archiver from "archiver";
|
import archiver from "archiver";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
const toSafeName = (name: string) => {
|
export const toSafeName = (name: string) => {
|
||||||
return name
|
return name
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/[<>:"/\\|?*]/g, "_")
|
.replace(/[<>:"/\\|?*]/g, "_")
|
||||||
.replace(/[\p{Cc}]/gu, "_")
|
.replace(/[\x00-\x1F\x7F]/g, "_")
|
||||||
.replace(/[\s-]+/g, "_")
|
.replace(/[\s-]+/g, "_")
|
||||||
.replace(/_+/g, "_")
|
.replace(/_+/g, "_")
|
||||||
.replace(/[. ]+$/g, "");
|
.replace(/[. ]+$/g, "");
|
||||||
|
|||||||
Reference in new issue
Block a user