UNPKG

@atlaskit/editor-plugin-image-upload

Version:

Image upload plugin for @atlaskit/editor-core

18 lines (17 loc) 464 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDragEvent = void 0; exports.isDroppedFile = isDroppedFile; // Typeguard Function var isDragEvent = exports.isDragEvent = function isDragEvent(event) { return 'dataTransfer' in event; }; function isDroppedFile(rawEvent) { var e = rawEvent; if (!e.dataTransfer) { return false; } return Array.prototype.slice.call(e.dataTransfer.types).indexOf('Files') !== -1; }