UNPKG

table-filter-multiselect

Version:

## Install You need to have react and react-dom as dependencies in your project.

14 lines (12 loc) 412 B
/** * Normalizes `target` for EventStack, because `target` can be passed as `boolean` or `string`. * * @param {boolean|string|HTMLElement|Window} target Value for normalization. * @return {HTMLElement|Window} A DOM node. */ const normalizeTarget = (target) => { if (target === 'document') return document if (target === 'window') return window return target || document } export default normalizeTarget