Don't execute unnecessary HTTP requests when browing a file directory
This commit is contained in:
parent
76300209f1
commit
b72a770ec9
6 changed files with 17 additions and 19 deletions
|
@ -11,3 +11,5 @@ export function bytesToHuman (bytes: number): string {
|
|||
export const bytesToMegabytes = (bytes: number) => Math.floor(bytes / 1000 / 1000);
|
||||
|
||||
export const randomInt = (low: number, high: number) => Math.floor(Math.random() * (high - low) + low);
|
||||
|
||||
export const cleanDirectoryPath = (path: string) => path.replace(/(^#\/*)|(\/(\/*))|(^$)/g, '/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue