@domql/state
Advanced tools
Comparing version 2.3.140 to 2.3.141
@@ -11,3 +11,3 @@ 'use strict' | ||
export const createState = function (element, parent, options) { | ||
const skip = (options && options.skip) ? options.skip : false | ||
const skipApplyMethods = Boolean(options?.skipApplyMethods) | ||
@@ -30,3 +30,6 @@ const objectizeState = checkForTypes(element) | ||
// NOTE: Only true when 'onlyResolveExtends' option is set to true | ||
if (skip) return element.state | ||
if (skipApplyMethods) { | ||
state.parent = element.parent.state | ||
return element.state | ||
} | ||
@@ -33,0 +36,0 @@ applyMethods(element) |
@@ -44,3 +44,3 @@ "use strict"; | ||
}; | ||
const getChildStateInKey = (stateKey, parentState, options = {}) => { | ||
const getChildStateInKey = (stateKey, parentState, options) => { | ||
const arr = stateKey.split("/"); | ||
@@ -47,0 +47,0 @@ const arrLength = arr.length - 1; |
@@ -104,3 +104,3 @@ "use strict"; | ||
}); | ||
const hasNotUpdated = options.preventUpdate !== true || !options.preventHoistElementUpdate; | ||
const hasNotUpdated = !options.preventUpdate || !options.preventHoistElementUpdate; | ||
if (!options.preventStateUpdateListener && hasNotUpdated) { | ||
@@ -121,3 +121,3 @@ (0, import_event.triggerEventOnUpdate)("stateUpdated", obj, element, options); | ||
const element = state.__element; | ||
if (options.preventUpdate !== true) { | ||
if (!options.preventUpdate) { | ||
element.update({}, { | ||
@@ -124,0 +124,0 @@ ...options, |
{ | ||
"name": "@domql/state", | ||
"version": "2.3.140", | ||
"version": "2.3.141", | ||
"license": "MIT", | ||
@@ -29,3 +29,3 @@ "type": "module", | ||
}, | ||
"gitHead": "0194cc2107dc429d3ac8da467eaf8aa73bac6fb3" | ||
"gitHead": "c867d7db9e2450d67e97a15ffc7b61692713c234" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
911
33148
14
1