@vue/shared
Advanced tools
+29
-2
| /** | ||
| * @vue/shared v3.5.41 | ||
| * @vue/shared v3.5.42 | ||
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -347,3 +347,3 @@ * @license MIT | ||
| } | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u000d\u0020]/; | ||
| const attrValidationCache = {}; | ||
@@ -447,2 +447,19 @@ function isSSRSafeAttrName(name) { | ||
| } | ||
| function looseCompareCollections(a, b) { | ||
| if (a.size !== b.size) return false; | ||
| const candidates = Array.from(b); | ||
| const matched = new Uint8Array(candidates.length); | ||
| for (const item of a) { | ||
| let index = -1; | ||
| for (let i = 0; i < candidates.length; i++) { | ||
| if (!matched[i] && looseEqual(item, candidates[i])) { | ||
| index = i; | ||
| break; | ||
| } | ||
| } | ||
| if (index < 0) return false; | ||
| matched[index] = 1; | ||
| } | ||
| return true; | ||
| } | ||
| function looseEqual(a, b) { | ||
@@ -471,2 +488,12 @@ if (a === b) return true; | ||
| } | ||
| aValidType = isMap(a); | ||
| bValidType = isMap(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| aValidType = isSet(a); | ||
| bValidType = isSet(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| const aKeysCount = Object.keys(a).length; | ||
@@ -473,0 +500,0 @@ const bKeysCount = Object.keys(b).length; |
| /** | ||
| * @vue/shared v3.5.41 | ||
| * @vue/shared v3.5.42 | ||
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -347,3 +347,3 @@ * @license MIT | ||
| } | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u000d\u0020]/; | ||
| const attrValidationCache = {}; | ||
@@ -447,2 +447,19 @@ function isSSRSafeAttrName(name) { | ||
| } | ||
| function looseCompareCollections(a, b) { | ||
| if (a.size !== b.size) return false; | ||
| const candidates = Array.from(b); | ||
| const matched = new Uint8Array(candidates.length); | ||
| for (const item of a) { | ||
| let index = -1; | ||
| for (let i = 0; i < candidates.length; i++) { | ||
| if (!matched[i] && looseEqual(item, candidates[i])) { | ||
| index = i; | ||
| break; | ||
| } | ||
| } | ||
| if (index < 0) return false; | ||
| matched[index] = 1; | ||
| } | ||
| return true; | ||
| } | ||
| function looseEqual(a, b) { | ||
@@ -471,2 +488,12 @@ if (a === b) return true; | ||
| } | ||
| aValidType = isMap(a); | ||
| bValidType = isMap(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| aValidType = isSet(a); | ||
| bValidType = isSet(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| const aKeysCount = Object.keys(a).length; | ||
@@ -473,0 +500,0 @@ const bKeysCount = Object.keys(b).length; |
| /** | ||
| * @vue/shared v3.5.41 | ||
| * @vue/shared v3.5.42 | ||
| * (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -343,3 +343,3 @@ * @license MIT | ||
| } | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; | ||
| const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u000d\u0020]/; | ||
| const attrValidationCache = {}; | ||
@@ -443,2 +443,19 @@ function isSSRSafeAttrName(name) { | ||
| } | ||
| function looseCompareCollections(a, b) { | ||
| if (a.size !== b.size) return false; | ||
| const candidates = Array.from(b); | ||
| const matched = new Uint8Array(candidates.length); | ||
| for (const item of a) { | ||
| let index = -1; | ||
| for (let i = 0; i < candidates.length; i++) { | ||
| if (!matched[i] && looseEqual(item, candidates[i])) { | ||
| index = i; | ||
| break; | ||
| } | ||
| } | ||
| if (index < 0) return false; | ||
| matched[index] = 1; | ||
| } | ||
| return true; | ||
| } | ||
| function looseEqual(a, b) { | ||
@@ -467,2 +484,12 @@ if (a === b) return true; | ||
| } | ||
| aValidType = isMap(a); | ||
| bValidType = isMap(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| aValidType = isSet(a); | ||
| bValidType = isSet(b); | ||
| if (aValidType || bValidType) { | ||
| return aValidType && bValidType ? looseCompareCollections(a, b) : false; | ||
| } | ||
| const aKeysCount = Object.keys(a).length; | ||
@@ -469,0 +496,0 @@ const bKeysCount = Object.keys(b).length; |
+1
-1
| { | ||
| "name": "@vue/shared", | ||
| "version": "3.5.41", | ||
| "version": "3.5.42", | ||
| "description": "internal utils shared across @vue packages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
90475
2.75%2193
3.84%