mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 21:06:04 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -161,11 +161,11 @@ const FILE_SIGNATURES: Record<string, string> = {
|
||||
FFF9: "audio/aac",
|
||||
"52494646????41564920": "audio/wav",
|
||||
"52494646????57415645": "audio/wave",
|
||||
"52494646????415550": "audio/aiff"
|
||||
"52494646????415550": "audio/aiff",
|
||||
};
|
||||
|
||||
async function detectMimeType(
|
||||
input: ReadableStream | ArrayBuffer | ArrayBufferView | string | Blob | File | null
|
||||
input: ReadableStream | ArrayBuffer | ArrayBufferView | string | Blob | File | null,
|
||||
): Promise<string | undefined> {
|
||||
if (!input) return;
|
||||
|
||||
@@ -202,7 +202,7 @@ async function detectMimeType(
|
||||
|
||||
export async function blobToFile(
|
||||
blob: Blob | File | unknown,
|
||||
overrides: FilePropertyBag & { name?: string } = {}
|
||||
overrides: FilePropertyBag & { name?: string } = {},
|
||||
): Promise<File> {
|
||||
if (isFile(blob)) return blob;
|
||||
if (!isBlob(blob)) throw new Error("Not a Blob");
|
||||
@@ -215,7 +215,7 @@ export async function blobToFile(
|
||||
|
||||
return new File([blob], name, {
|
||||
type: type || guess(name),
|
||||
lastModified: Date.now()
|
||||
lastModified: Date.now(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -340,5 +340,5 @@ export const enum HttpStatus {
|
||||
INSUFFICIENT_STORAGE = 507,
|
||||
LOOP_DETECTED = 508,
|
||||
NOT_EXTENDED = 510,
|
||||
NETWORK_AUTHENTICATION_REQUIRED = 511
|
||||
NETWORK_AUTHENTICATION_REQUIRED = 511,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user