UNPKG

react-dnd

Version:
8 lines (7 loc) 240 B
export function isValidType(type, allowArray) { return (typeof type === 'string' || typeof type === 'symbol' || (!!allowArray && Array.isArray(type) && type.every(t => isValidType(t, false)))); }