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