Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/utils

Package Overview
Dependencies
Maintainers
5
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/utils - npm Package Compare versions

Comparing version 0.29.1 to 0.30.0

4

lib/findDOMElement.js

@@ -12,4 +12,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

module.exports = function findDOMElement(element) {
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
if (typeof element === 'string') {
return document.querySelector(element);
return context.querySelector(element);
}

@@ -16,0 +18,0 @@

{
"name": "@uppy/utils",
"description": "Shared utility functions for Uppy Core and plugins maintained by the Uppy team.",
"version": "0.29.1",
"version": "0.30.0",
"license": "MIT",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

},
"gitHead": "3ddf4c7548766a0c522b9a45c03b1fd7d4e03d43"
"gitHead": "4dcef4c3b949a35ccfe7b4339a776a5d43052664"
}

@@ -9,5 +9,5 @@ const isDOMElement = require('./isDOMElement')

*/
module.exports = function findDOMElement (element) {
module.exports = function findDOMElement (element, context = document) {
if (typeof element === 'string') {
return document.querySelector(element)
return context.querySelector(element)
}

@@ -14,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc