@domql/utils 2.3.18 → 2.3.20

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/types.js +5 -5
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.3.18",
3
+ "version": "2.3.20",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
7
  "@domql/globals": "latest",
8
8
  "@domql/tags": "latest"
9
9
  },
10
- "gitHead": "d2aa5deb9e7e39fc8bbc34b8431658788dcb1f34"
10
+ "gitHead": "e3a1ae560ae4606c7db7ee7108380ff29dfc291b"
11
11
  }
package/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { window } from '@domql/globals'
3
+ import { global } from '@domql/globals'
4
4
  import { HTML_TAGS } from '@domql/tags'
5
5
 
6
6
  export const isValidHtmlTag = arg => HTML_TAGS.body.indexOf(arg)
@@ -30,16 +30,16 @@ export const isObjectLike = arg => {
30
30
 
31
31
  export const isNode = obj => {
32
32
  return (
33
- typeof window.Node === 'object'
34
- ? obj instanceof window.Node
33
+ typeof global.Node === 'object'
34
+ ? obj instanceof global.Node
35
35
  : obj && typeof obj === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string'
36
36
  )
37
37
  }
38
38
 
39
39
  export const isHtmlElement = obj => {
40
40
  return (
41
- typeof window.HTMLElement === 'object'
42
- ? obj instanceof window.HTMLElement // DOM2
41
+ typeof global.HTMLElement === 'object'
42
+ ? obj instanceof global.HTMLElement // DOM2
43
43
  : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'
44
44
  )
45
45
  }