@vue/shared 3.5.2 → 3.5.4

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.2
2
+ * @vue/shared v3.5.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -9,9 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  /*! #__NO_SIDE_EFFECTS__ */
11
11
  // @__NO_SIDE_EFFECTS__
12
- function makeMap(str, expectsLowerCase) {
13
- const set = new Set(str.split(","));
14
- return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
12
+ function makeMap(str) {
13
+ const map = /* @__PURE__ */ Object.create(null);
14
+ for (const key of str.split(",")) map[key] = 1;
15
+ return (val) => val in map;
15
16
  }
16
17
 
17
18
  const EMPTY_OBJ = Object.freeze({}) ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.2
2
+ * @vue/shared v3.5.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -9,9 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  /*! #__NO_SIDE_EFFECTS__ */
11
11
  // @__NO_SIDE_EFFECTS__
12
- function makeMap(str, expectsLowerCase) {
13
- const set = new Set(str.split(","));
14
- return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
12
+ function makeMap(str) {
13
+ const map = /* @__PURE__ */ Object.create(null);
14
+ for (const key of str.split(",")) map[key] = 1;
15
+ return (val) => val in map;
15
16
  }
16
17
 
17
18
  const EMPTY_OBJ = {};
package/dist/shared.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * So that rollup can tree-shake them if necessary.
7
7
  */
8
8
  /*! #__NO_SIDE_EFFECTS__ */
9
- export declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean;
9
+ export declare function makeMap(str: string): (key: string) => boolean;
10
10
 
11
11
  export declare const EMPTY_OBJ: {
12
12
  readonly [key: string]: any;
@@ -1,13 +1,14 @@
1
1
  /**
2
- * @vue/shared v3.5.2
2
+ * @vue/shared v3.5.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  /*! #__NO_SIDE_EFFECTS__ */
7
7
  // @__NO_SIDE_EFFECTS__
8
- function makeMap(str, expectsLowerCase) {
9
- const set = new Set(str.split(","));
10
- return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
8
+ function makeMap(str) {
9
+ const map = /* @__PURE__ */ Object.create(null);
10
+ for (const key of str.split(",")) map[key] = 1;
11
+ return (val) => val in map;
11
12
  }
12
13
 
13
14
  const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.5.2",
3
+ "version": "3.5.4",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",