Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 2x 2x 10x 10x 10x 10x | const UNASSIGNED = 'Unassigned';
const BROWSER_SUPPORTED_FILES = [
'pdf',
'text',
'txt',
'css',
'jpg',
'jpeg',
'gif',
'png',
'bmp',
'ico',
'sh',
'mp3',
'wav',
'ogg'
];
export function isAudioFile(fileName) {
const extension = getExtensionFromFileName(fileName);
return /mp3|wav|ogg/i.test(extension);
}
export function getExtensionFromFileName(fileName) {
Eif (fileName && fileName.indexOf(".") !== -1) {
return fileName
.substring(fileName.lastIndexOf(".") + 1, fileName.length)
.toLowerCase();
}
return "";
}
export function isBrowserSupportedFile(fileName) {
const extension = getExtensionFromFileName(fileName);
return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
}
|