6 lines
159 B
TypeScript
6 lines
159 B
TypeScript
|
export default function sanitize(path: string): string {
|
||
|
return path.replace(/^\./, '__.')
|
||
|
.replace(/\//g, '__fwdslash__')
|
||
|
.replace(/\*/g, '__star__');
|
||
|
}
|