mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Add home dir
This commit is contained in:
parent
e3a55e6210
commit
9827320eee
@ -1,4 +1,4 @@
|
|||||||
export default (text:string)=>{
|
export default (text:string)=>{
|
||||||
const dirSlash = process.platform === 'linux' ? '\/' : '\\';
|
const dirSlash = process.platform === 'linux' ? '\/' : '\\';
|
||||||
return text?.replace(/(?<=\/Users\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash);
|
return text?.replace(/(?<=\/Users\/|\/home\/|\/media\/)[^/]+/g, match=>'・'.repeat(match.length)).split(dirSlash).join(dirSlash);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user