Jake’s thoroughness is doing my head in :P

This commit is contained in:
Surma
2018-07-20 11:12:42 +01:00
parent df7e112d22
commit 4ee5572d2f
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ export const decodersPromise: Promise<Decoder[]> = Promise.all(
// values here.
).then(list => list.filter(item => !!item)) as any as Promise<Decoder[]>;
export async function findDecodersByMimeType(mimeType: string): Promise<Decoder[]> {
async function findDecodersByMimeType(mimeType: string): Promise<Decoder[]> {
const decoders = await decodersPromise;
return decoders.filter(decoder => decoder.canHandleMimeType(mimeType));
}

View File

@@ -134,7 +134,7 @@ export async function sniffMimeType(blob: Blob): Promise<string> {
Array.from(new Uint8Array(firstChunk))
.map(v => String.fromCodePoint(v))
.join('');
for (const [detector, mimeType] of magicNumberToMimeType.entries()) {
for (const [detector, mimeType] of magicNumberToMimeType) {
if (detector.test(firstChunkString)) {
return mimeType;
}