Remove flow defs and usage, will be using TS

This commit is contained in:
Dane Everitt 2018-12-16 14:11:56 -08:00
parent 8fd0e5ff57
commit cc7f7d7123
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
10 changed files with 110 additions and 88 deletions

View file

@ -1,4 +1,3 @@
// @flow
import format from 'date-fns/format';
/**
@ -8,13 +7,13 @@ import format from 'date-fns/format';
* @param {Number} bytes
* @return {String}
*/
export function readableSize (bytes: number): string {
export function readableSize (bytes) {
if (Math.abs(bytes) < 1024) {
return `${bytes} Bytes`;
}
let u: number = -1;
const units: Array<string> = ['KiB', 'MiB', 'GiB', 'TiB'];
let u = -1;
const units = ['KiB', 'MiB', 'GiB', 'TiB'];
do {
bytes /= 1024;
@ -30,6 +29,6 @@ export function readableSize (bytes: number): string {
* @param {String} date
* @return {String}
*/
export function formatDate (date: string): string {
export function formatDate (date) {
return format(date, 'MMM D, YYYY [at] HH:MM');
}