New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@domql/utils

Package Overview
Dependencies
Maintainers
3
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/utils - npm Package Compare versions

Comparing version 2.3.100 to 2.3.101

4

dist/cjs/node.js

@@ -21,2 +21,3 @@ "use strict";

__export(node_exports, {
isHtmlElement: () => isHtmlElement,
isNode: () => isNode

@@ -30,1 +31,4 @@ });

};
const isHtmlElement = (obj) => {
return typeof import_globals.window.HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string";
};

14

dist/cjs/types.js

@@ -27,4 +27,2 @@ "use strict";

isFunction: () => isFunction,
isHtmlElement: () => isHtmlElement,
isNode: () => isNode,
isNot: () => isNot,

@@ -40,4 +38,4 @@ isNull: () => isNull,

module.exports = __toCommonJS(types_exports);
var import_globals = require("@domql/globals");
var import_tags = require("@domql/tags");
var import_node = require("./node");
const isValidHtmlTag = (arg) => import_tags.HTML_TAGS.body.includes(arg);

@@ -60,8 +58,2 @@ const isObject = (arg) => {

};
const isNode = (obj) => {
return typeof import_globals.window.Node === "object" ? obj instanceof import_globals.window.Node : obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string";
};
const isHtmlElement = (obj) => {
return typeof import_globals.window.HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string";
};
const isDefined = (arg) => {

@@ -82,4 +74,4 @@ return isObject(arg) || isObjectLike(arg) || isString(arg) || isNumber(arg) || isFunction(arg) || isArray(arg) || isObjectLike(arg) || isBoolean(arg) || isNull(arg);

objectLike: isObjectLike,
node: isNode,
htmlElement: isHtmlElement,
node: import_node.isNode,
htmlElement: import_node.isHtmlElement,
defined: isDefined

@@ -86,0 +78,0 @@ };

@@ -16,1 +16,9 @@ 'use strict'

}
export const isHtmlElement = obj => {
return (
typeof window.HTMLElement === 'object'
? obj instanceof window.HTMLElement // DOM2
: obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'
)
}
{
"name": "@domql/utils",
"version": "2.3.100",
"version": "2.3.101",
"license": "MIT",

@@ -25,3 +25,3 @@ "type": "module",

},
"gitHead": "4d65ad04e488122bfc73ec81dc16c45b842ffa9b"
"gitHead": "d90273abc53b88938f10d1d44f211c6e35ac1c9c"
}
'use strict'
import { window } from '@domql/globals'
import { HTML_TAGS } from '@domql/tags'
import { isHtmlElement, isNode } from './node'

@@ -31,18 +31,2 @@ export const isValidHtmlTag = arg => HTML_TAGS.body.includes(arg)

export const isNode = obj => {
return (
typeof window.Node === 'object'
? obj instanceof window.Node
: obj && typeof obj === 'object' && typeof obj.nodeType === 'number' && typeof obj.nodeName === 'string'
)
}
export const isHtmlElement = obj => {
return (
typeof window.HTMLElement === 'object'
? obj instanceof window.HTMLElement // DOM2
: obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string'
)
}
export const isDefined = arg => {

@@ -49,0 +33,0 @@ return isObject(arg) ||

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