UNPKG

@uppy/utils

Version:

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

14 lines 332 B
import isDOMElement from './isDOMElement.js'; function findDOMElement(element, context) { if (context === void 0) { context = document; } if (typeof element === 'string') { return context.querySelector(element); } if (isDOMElement(element)) { return element; } return null; } export default findDOMElement;