7 lines
308 B
JavaScript
7 lines
308 B
JavaScript
export function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) {
|
|
const result = typesToTry.reduce((resultSoFar, typeToTry)=>resultSoFar || dataTransfer.getData(typeToTry)
|
|
, '');
|
|
return result != null ? result : defaultValue;
|
|
}
|
|
|
|
//# sourceMappingURL=getDataFromDataTransfer.js.map
|