angular-draganddrop.js
function accepts(type, event) {
        if (typeof type === 'boolean') return type;
        if (typeof type === 'string') return accepts([type], event);
        if (Array.isArray(type)) {
          return accepts(function (types) {
            return types.some(function (_type) {
              return type.indexOf(_type) !== -1;
            });
          }, event);
        }
        if (typeof type === 'function') return type(toArray(event.dataTransfer.types));

        return false;
      }
function accepts(type, event) {
        if (typeof type === 'boolean') return type;
        if (typeof type === 'string') return accepts([type], event);
        if (Array.isArray(type)) {
          return accepts(function (types) {
            return types.some(function (_type) {
              return type.indexOf(_type) !== -1;
            });
          }, event);
        }
        if (typeof type === 'function') return type(toArray(event.dataTransfer.types));

        return false;
      }
function accepts ( type , event ) { if ( typeof type === 'boolean' ) return type ; if ( typeof type === 'string' ) return accepts ( [ type ] , event ) ; if ( Array . isArray ( type ) ) { return accepts ( function ( types ) { return types . some ( function ( _type ) { return type . indexOf ( _type ) !== - 1 ; } ) ; } , event ) ; } if ( typeof type === 'function' ) return type ( toArray ( event . dataTransfer . types ) ) ; return false ; }
Test if a type is accepted.

@param {String|Array|Function} type
@param {Event} event
@returns {Boolean}
Test if a type is accepted .