optimize a bit code, re-order imports

This commit is contained in:
Stef-00012 2025-02-11 18:15:54 +01:00
parent 7336de10f6
commit 044de8ce34
No known key found for this signature in database
GPG key ID: 28BE9A9E4EF0E6BF
36 changed files with 1368 additions and 1040 deletions

View file

@ -1,10 +1,10 @@
import { isLightColor, rgbaToHex, toRgba } from "@/functions/color";
import mimetypesJSON from "@/assets/mimetypes.json";
import type { Mimetypes } from "@/types/mimetypes";
import bytes from "bytes";
import ms, { type FormatOptions } from "enhanced-ms";
import * as FileSystem from "expo-file-system";
import { isLightColor, rgbaToHex, toRgba } from "./color";
import { namedColors } from "@/constants/colors";
import * as FileSystem from "expo-file-system";
import ms from "enhanced-ms";
import bytes from "bytes";
const mimetypes = mimetypesJSON as Mimetypes;
@ -117,7 +117,8 @@ export function convertToBytes(
export function convertToTime(
value: string | number,
options?: FormatOptions,
// biome-ignore lint/suspicious/noExplicitAny: enhanced-ms does not export the FormatOptions interface
options?: any,
): string | null {
if (typeof value === "number") return ms(value);