Socket
Socket
Sign inDemoInstall

@domql/utils

Package Overview
Dependencies
Maintainers
0
Versions
168
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.5.119 to 2.5.123

12

dist/cjs/function.js

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

__export(function_exports, {
cloneFunction: () => cloneFunction,
debounce: () => debounce,

@@ -71,1 +72,12 @@ debounceOnContext: () => debounceOnContext,

};
function cloneFunction(fn, win = window) {
const temp = function() {
return fn.apply(win, arguments);
};
for (const key in fn) {
if (Object.hasOwnProperty.call(fn, key)) {
temp[key] = fn[key];
}
}
return temp;
}

3

dist/cjs/object.js

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

var import_node = require("./node.js");
var import_function = require("./function.js");
const exec = (param, element, state, context) => {

@@ -176,2 +177,4 @@ if ((0, import_types.isFunction)(param)) {

o[prop] = deepCloneWithExtend(objProp, excludeFrom, options);
} else if ((0, import_types.isFunction)(objProp) && options.window) {
o[prop] = (0, import_function.cloneFunction)(objProp, options.window);
} else

@@ -178,0 +181,0 @@ o[prop] = objProp;

@@ -74,1 +74,15 @@ 'use strict'

}
export function cloneFunction (fn, win = window) {
const temp = function () {
return fn.apply(win, arguments)
}
// Copy properties from original function
for (const key in fn) {
if (Object.hasOwnProperty.call(fn, key)) {
temp[key] = fn[key]
}
}
return temp
}

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

import { isDOMNode } from './node.js'
import { cloneFunction } from './function.js'

@@ -180,2 +181,4 @@ export const exec = (param, element, state, context) => {

// })
} else if (isFunction(objProp) && options.window) {
o[prop] = cloneFunction(objProp, options.window)
} else o[prop] = objProp

@@ -182,0 +185,0 @@ }

4

package.json
{
"name": "@domql/utils",
"version": "2.5.119",
"version": "2.5.123",
"license": "MIT",

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

},
"gitHead": "930d02cd05b1fa9cbfe3da9b1eea3f1baafdab6b",
"gitHead": "6dd041deb89bc2ebfa1f5ee9360d563df60eca13",
"devDependencies": {

@@ -29,0 +29,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