Buckets:
| import path from "path" | |
| export function abbreviateHome(input: string, home: string) { | |
| if (!home) return input | |
| const relative = path.relative(home, input) | |
| if (relative === "") return "~" | |
| if (relative === ".." || relative.startsWith(".." + path.sep) || path.isAbsolute(relative)) return input | |
| return "~" + path.sep + relative | |
| } | |
Xet Storage Details
- Size:
- 337 Bytes
- Xet hash:
- f6f036f6fb8fb74a9077c9e77a00782c8e4e7e1b51713268d1111ab36a1fec2b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.