mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
And rewrite all the require calls. ```bash git mv src/utils/* packages/@uppy/utils/src sed -i 's/[./]*\/utils\//@uppy\/utils\/lib\//' src/**/*.js # transform (../)*utils → @uppy/utils ```
8 lines
229 B
JavaScript
8 lines
229 B
JavaScript
/**
|
|
* Check if an object is a DOM element. Duck-typing based on `nodeType`.
|
|
*
|
|
* @param {*} obj
|
|
*/
|
|
module.exports = function isDOMElement (obj) {
|
|
return obj && typeof obj === 'object' && obj.nodeType === Node.ELEMENT_NODE
|
|
}
|