@mixd-id/web-scaffold 0.1.230406166 → 0.1.230406167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/Alert.vue +1 -1
- package/src/utils/helpers.js +19 -0
package/package.json
CHANGED
package/src/components/Alert.vue
CHANGED
package/src/utils/helpers.js
CHANGED
|
@@ -366,6 +366,24 @@ const createComponentInstance = function(component){
|
|
|
366
366
|
return component
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
const deepObjectContainsObject = (outerObject, innerObject) => {
|
|
370
|
+
for (const key in innerObject) {
|
|
371
|
+
if (innerObject.hasOwnProperty(key)) {
|
|
372
|
+
if (typeof innerObject[key] === 'object' && typeof outerObject[key] === 'object') {
|
|
373
|
+
// If both properties are objects, recursively check them
|
|
374
|
+
if (!deepObjectContainsObject(outerObject[key], innerObject[key])) {
|
|
375
|
+
return false; // Nested objects do not match
|
|
376
|
+
}
|
|
377
|
+
} else {
|
|
378
|
+
if (outerObject[key] !== innerObject[key]) {
|
|
379
|
+
return false; // Property in innerObject doesn't exist in outerObject or values don't match
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return true; // All properties and values in innerObject exist in outerObject
|
|
385
|
+
}
|
|
386
|
+
|
|
369
387
|
|
|
370
388
|
module.exports = {
|
|
371
389
|
ceil,
|
|
@@ -389,4 +407,5 @@ module.exports = {
|
|
|
389
407
|
generateStylesheet,
|
|
390
408
|
hexToRgb,
|
|
391
409
|
createComponentInstance,
|
|
410
|
+
deepObjectContainsObject,
|
|
392
411
|
}
|