mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-22 16:23:45 +02:00
Format all the files
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { format } from 'date-fns';
|
||||
import {format} from 'date-fns';
|
||||
|
||||
/**
|
||||
* Return the human readable filesize for a given number of bytes. This
|
||||
* uses 1024 as the base, so the response is denoted accordingly.
|
||||
*/
|
||||
export function readableSize (bytes: number): string {
|
||||
export function readableSize(bytes: number): string {
|
||||
if (Math.abs(bytes) < 1024) {
|
||||
return `${bytes} Bytes`;
|
||||
}
|
||||
@@ -23,6 +23,6 @@ export function readableSize (bytes: number): string {
|
||||
/**
|
||||
* Format the given date as a human readable string.
|
||||
*/
|
||||
export function formatDate (date: string): string {
|
||||
export function formatDate(date: string): string {
|
||||
return format(date, 'MMM D, YYYY [at] HH:MM');
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user