UNPKG

@uppy/utils

Version:

Shared utility functions for Uppy Core and plugins maintained by the Uppy team.

12 lines (11 loc) 306 B
import isDOMElement from './isDOMElement.js'; function findDOMElement(element, context = document) { if (typeof element === 'string') { return context.querySelector(element); } if (isDOMElement(element)) { return element; } return null; } export default findDOMElement;