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

@domql/element

Package Overview
Dependencies
Maintainers
0
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/element - npm Package Compare versions

Comparing version 2.5.173 to 2.5.174

8

dist/cjs/methods/index.js

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

module.exports = __toCommonJS(methods_exports);
var import_event = require("@domql/event");
var import_utils = require("@domql/utils");

@@ -144,4 +145,7 @@ var import_tree = require("../tree");

}
function remove() {
function remove(opts) {
const element = this;
const beforeUpdateReturns = (0, import_event.triggerEventOnUpdate)("beforeRemove", element, opts);
if (beforeUpdateReturns === false)
return element;
if ((0, import_utils.isFunction)(element.node.remove))

@@ -156,2 +160,3 @@ element.node.remove();

element.parent.__ref.__children = (0, import_utils.removeValueFromArray)(element.parent.__ref.__children, element.key);
(0, import_event.triggerEventOnUpdate)("remove", element, opts);
}

@@ -260,2 +265,3 @@ function get(param) {

verbose.call(this);
throw new Error(...params);
}

@@ -262,0 +268,0 @@ }

'use strict'
import { triggerEventOnUpdate } from '@domql/event'
import { isDefined, isObject, isFunction, isObjectLike, isProduction, removeValueFromArray, deepClone } from '@domql/utils'

@@ -103,4 +104,6 @@ import { TREE } from '../tree'

export function remove () {
export function remove (opts) {
const element = this
const beforeUpdateReturns = triggerEventOnUpdate('beforeRemove', element, opts)
if (beforeUpdateReturns === false) return element
if (isFunction(element.node.remove)) element.node.remove()

@@ -113,2 +116,3 @@ else if (!isProduction()) {

if (element.parent.__ref) element.parent.__ref.__children = removeValueFromArray(element.parent.__ref.__children, element.key)
triggerEventOnUpdate('remove', element, opts)
}

@@ -222,2 +226,3 @@

if (params[params.length - 1]?.verbose) verbose.call(this)
throw new Error(...params)
}

@@ -224,0 +229,0 @@ }

4

package.json
{
"name": "@domql/element",
"version": "2.5.173",
"version": "2.5.174",
"license": "MIT",

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

},
"gitHead": "1e24ece1c2ab9e794b662804fcac399699bf99c5",
"gitHead": "b14cdb4aa1e33bc43a46bedfac8fc8a8e80221be",
"devDependencies": {

@@ -37,0 +37,0 @@ "@babel/core": "^7.12.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