Format all the files
This commit is contained in:
parent
5bff8d99cc
commit
b6773b56c1
22 changed files with 158 additions and 159 deletions
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue