Repository URL to install this package:
|
Version:
3.12.16 ▾
|
import isImage from '@filerobot/utils/lib/isImage';
import isSupportedVideo from '@filerobot/utils/lib/isSupportedVideo';
import isSvg from '@filerobot/utils/lib/isSvg';
export var hasImageOrVideoFile = function hasImageOrVideoFile(files) {
var result = [false, false];
files.forEach(function (file) {
if (isImage(file) && !isSvg(file)) {
result[0] = true;
} else if (isSupportedVideo(file)) {
result[1] = true;
}
if (result[0] && result[1]) {
return result;
}
});
return result;
};