Socket
Socket
Sign inDemoInstall

@domql/element

Package Overview
Dependencies
Maintainers
0
Versions
132
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.100 to 2.5.101

20

dist/cjs/methods/index.js

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

lookdown: () => lookdown,
lookdownAll: () => lookdownAll,
lookup: () => lookup,

@@ -99,2 +100,20 @@ nextElement: () => nextElement,

};
const lookdownAll = function(param, results = []) {
const el = this;
const { __ref: ref } = el;
const children = ref.__children;
for (let i = 0; i < children.length; i++) {
const v = children[i];
const childElem = el[v];
if (v === param)
results.push(childElem);
else if ((0, import_utils.isFunction)(param)) {
const exec = param(childElem, childElem.state, childElem.context);
if (childElem.state && exec)
results.push(childElem);
}
childElem == null ? void 0 : childElem.lookdownAll(param, results);
}
return results.length ? results : null;
};
const remove = function() {

@@ -211,2 +230,3 @@ const element = this;

"lookdown",
"lookdownAll",
"spotByPath",

@@ -213,0 +233,0 @@ "keys",

1

dist/cjs/methods/set.js

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

lookdown: import__.lookdown.bind(element),
lookdownAll: import__.lookdownAll.bind(element),
spotByPath: import__.spotByPath.bind(element),

@@ -51,0 +52,0 @@ parse: import__.parse.bind(element),

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

lookdown: {},
lookdownAll: {},
spotByPath: {},

@@ -67,0 +68,0 @@ keys: {},

@@ -68,2 +68,22 @@ 'use strict'

export const lookdownAll = function (param, results = []) {
const el = this
const { __ref: ref } = el
const children = ref.__children
for (let i = 0; i < children.length; i++) {
const v = children[i]
const childElem = el[v]
if (v === param) results.push(childElem)
else if (isFunction(param)) {
const exec = param(childElem, childElem.state, childElem.context)
if (childElem.state && exec) results.push(childElem)
}
childElem?.lookdownAll(param, results)
}
return results.length ? results : null
}
export const remove = function () {

@@ -187,2 +207,3 @@ const element = this

'lookdown',
'lookdownAll',
'spotByPath',

@@ -189,0 +210,0 @@ 'keys',

@@ -11,2 +11,3 @@ 'use strict'

lookdown,
lookdownAll,
setProps,

@@ -35,2 +36,3 @@ remove,

lookdown: lookdown.bind(element),
lookdownAll: lookdownAll.bind(element),
spotByPath: spotByPath.bind(element),

@@ -37,0 +39,0 @@ parse: parse.bind(element),

@@ -49,2 +49,3 @@ 'use strict'

lookdown: {},
lookdownAll: {},
spotByPath: {},

@@ -51,0 +52,0 @@ keys: {},

4

package.json
{
"name": "@domql/element",
"version": "2.5.100",
"version": "2.5.101",
"license": "MIT",

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

},
"gitHead": "38b74a597edc2f9454a81b892505282a944fd5b9",
"gitHead": "5a5e8988f25e9a77e44596d9fd23e8a00b725685",
"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