@domql/utils 2.3.106 → 2.3.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/node.js CHANGED
@@ -24,8 +24,8 @@ __export(node_exports, {
24
24
  module.exports = __toCommonJS(node_exports);
25
25
  var import_globals = require("@domql/globals");
26
26
  const isNode = (obj) => {
27
- return typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string";
27
+ return (typeof Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string") || false;
28
28
  };
29
29
  const isHtmlElement = (obj) => {
30
- return typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string";
30
+ return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
31
31
  };
package/node.js CHANGED
@@ -7,7 +7,7 @@ export const isNode = (obj) => {
7
7
  typeof Node === 'object'
8
8
  ? obj instanceof window.Node
9
9
  : obj && typeof obj === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string'
10
- )
10
+ ) || false
11
11
  }
12
12
 
13
13
  // Returns true if it is a DOM element
@@ -16,5 +16,5 @@ export const isHtmlElement = obj => {
16
16
  typeof HTMLElement === 'object'
17
17
  ? obj instanceof window.HTMLElement // DOM2
18
18
  : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'
19
- )
19
+ ) || false
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.3.106",
3
+ "version": "2.3.107",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -23,5 +23,5 @@
23
23
  "@domql/key": "latest",
24
24
  "@domql/tags": "latest"
25
25
  },
26
- "gitHead": "a63bdc0a066a53d3569bca24219e1827893e5757"
26
+ "gitHead": "55a6b803c86bb8709119a345d7e0ed047b73befa"
27
27
  }