@vue/shared
Advanced tools
Comparing version 3.4.27 to 3.4.28
/** | ||
* @vue/shared v3.4.27 | ||
* @vue/shared v3.4.28 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -83,5 +83,5 @@ * @license MIT | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
const invokeArrayFns = (fns, arg) => { | ||
const invokeArrayFns = (fns, ...arg) => { | ||
for (let i = 0; i < fns.length; i++) { | ||
fns[i](arg); | ||
fns[i](...arg); | ||
} | ||
@@ -206,2 +206,5 @@ }; | ||
function generateCodeFrame(source, start = 0, end = source.length) { | ||
start = Math.max(0, Math.min(start, source.length)); | ||
end = Math.max(0, Math.min(end, source.length)); | ||
if (start > end) return ""; | ||
let lines = source.split(/(\r?\n)/); | ||
@@ -216,4 +219,3 @@ const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); | ||
for (let j = i - range; j <= i + range || end > count; j++) { | ||
if (j < 0 || j >= lines.length) | ||
continue; | ||
if (j < 0 || j >= lines.length) continue; | ||
const line = j + 1; | ||
@@ -311,4 +313,3 @@ res.push( | ||
function normalizeProps(props) { | ||
if (!props) | ||
return null; | ||
if (!props) return null; | ||
let { class: klass, style } = props; | ||
@@ -418,4 +419,3 @@ if (klass && !isString(klass)) { | ||
function looseCompareArrays(a, b) { | ||
if (a.length !== b.length) | ||
return false; | ||
if (a.length !== b.length) return false; | ||
let equal = true; | ||
@@ -428,4 +428,3 @@ for (let i = 0; equal && i < a.length; i++) { | ||
function looseEqual(a, b) { | ||
if (a === b) | ||
return true; | ||
if (a === b) return true; | ||
let aValidType = isDate(a); | ||
@@ -432,0 +431,0 @@ let bValidType = isDate(b); |
/** | ||
* @vue/shared v3.4.27 | ||
* @vue/shared v3.4.28 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -83,5 +83,5 @@ * @license MIT | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
const invokeArrayFns = (fns, arg) => { | ||
const invokeArrayFns = (fns, ...arg) => { | ||
for (let i = 0; i < fns.length; i++) { | ||
fns[i](arg); | ||
fns[i](...arg); | ||
} | ||
@@ -206,2 +206,5 @@ }; | ||
function generateCodeFrame(source, start = 0, end = source.length) { | ||
start = Math.max(0, Math.min(start, source.length)); | ||
end = Math.max(0, Math.min(end, source.length)); | ||
if (start > end) return ""; | ||
let lines = source.split(/(\r?\n)/); | ||
@@ -216,4 +219,3 @@ const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); | ||
for (let j = i - range; j <= i + range || end > count; j++) { | ||
if (j < 0 || j >= lines.length) | ||
continue; | ||
if (j < 0 || j >= lines.length) continue; | ||
const line = j + 1; | ||
@@ -311,4 +313,3 @@ res.push( | ||
function normalizeProps(props) { | ||
if (!props) | ||
return null; | ||
if (!props) return null; | ||
let { class: klass, style } = props; | ||
@@ -418,4 +419,3 @@ if (klass && !isString(klass)) { | ||
function looseCompareArrays(a, b) { | ||
if (a.length !== b.length) | ||
return false; | ||
if (a.length !== b.length) return false; | ||
let equal = true; | ||
@@ -428,4 +428,3 @@ for (let i = 0; equal && i < a.length; i++) { | ||
function looseEqual(a, b) { | ||
if (a === b) | ||
return true; | ||
if (a === b) return true; | ||
let aValidType = isDate(a); | ||
@@ -432,0 +431,0 @@ let bValidType = isDate(b); |
@@ -64,3 +64,3 @@ /** | ||
export declare const hasChanged: (value: any, oldValue: any) => boolean; | ||
export declare const invokeArrayFns: (fns: Function[], arg?: any) => void; | ||
export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void; | ||
export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void; | ||
@@ -67,0 +67,0 @@ /** |
/** | ||
* @vue/shared v3.4.27 | ||
* @vue/shared v3.4.28 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -79,5 +79,5 @@ * @license MIT | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
const invokeArrayFns = (fns, arg) => { | ||
const invokeArrayFns = (fns, ...arg) => { | ||
for (let i = 0; i < fns.length; i++) { | ||
fns[i](arg); | ||
fns[i](...arg); | ||
} | ||
@@ -202,2 +202,5 @@ }; | ||
function generateCodeFrame(source, start = 0, end = source.length) { | ||
start = Math.max(0, Math.min(start, source.length)); | ||
end = Math.max(0, Math.min(end, source.length)); | ||
if (start > end) return ""; | ||
let lines = source.split(/(\r?\n)/); | ||
@@ -212,4 +215,3 @@ const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); | ||
for (let j = i - range; j <= i + range || end > count; j++) { | ||
if (j < 0 || j >= lines.length) | ||
continue; | ||
if (j < 0 || j >= lines.length) continue; | ||
const line = j + 1; | ||
@@ -307,4 +309,3 @@ res.push( | ||
function normalizeProps(props) { | ||
if (!props) | ||
return null; | ||
if (!props) return null; | ||
let { class: klass, style } = props; | ||
@@ -414,4 +415,3 @@ if (klass && !isString(klass)) { | ||
function looseCompareArrays(a, b) { | ||
if (a.length !== b.length) | ||
return false; | ||
if (a.length !== b.length) return false; | ||
let equal = true; | ||
@@ -424,4 +424,3 @@ for (let i = 0; equal && i < a.length; i++) { | ||
function looseEqual(a, b) { | ||
if (a === b) | ||
return true; | ||
if (a === b) return true; | ||
let aValidType = isDate(a); | ||
@@ -428,0 +427,0 @@ let bValidType = isDate(b); |
{ | ||
"name": "@vue/shared", | ||
"version": "3.4.27", | ||
"version": "3.4.28", | ||
"description": "internal utils shared across @vue packages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
80989
1960