@vue/shared-canary
Advanced tools
Comparing version 3.20240715.0-minor.0 to 3.20240812.0-minor.0
/** | ||
* @vue/shared-canary v3.20240715.0-minor.0 | ||
* @vue/shared-canary v3.20240812.0-minor.0 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -68,5 +68,7 @@ * @license MIT | ||
const camelizeRE = /-(\w)/g; | ||
const camelize = cacheStringFunction((str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
}); | ||
const camelize = cacheStringFunction( | ||
(str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
} | ||
); | ||
const hyphenateRE = /\B([A-Z])/g; | ||
@@ -79,6 +81,8 @@ const hyphenate = cacheStringFunction( | ||
}); | ||
const toHandlerKey = cacheStringFunction((str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
}); | ||
const toHandlerKey = cacheStringFunction( | ||
(str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
} | ||
); | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
@@ -466,7 +470,10 @@ const invokeArrayFns = (fns, ...arg) => { | ||
const isRef = (val) => { | ||
return !!(val && val["__v_isRef"] === true); | ||
}; | ||
const toDisplayString = (val) => { | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); | ||
}; | ||
const replacer = (_key, val) => { | ||
if (val && val["__v_isRef"]) { | ||
if (isRef(val)) { | ||
return replacer(_key, val.value); | ||
@@ -473,0 +480,0 @@ } else if (isMap(val)) { |
/** | ||
* @vue/shared-canary v3.20240715.0-minor.0 | ||
* @vue/shared-canary v3.20240812.0-minor.0 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -68,5 +68,7 @@ * @license MIT | ||
const camelizeRE = /-(\w)/g; | ||
const camelize = cacheStringFunction((str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
}); | ||
const camelize = cacheStringFunction( | ||
(str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
} | ||
); | ||
const hyphenateRE = /\B([A-Z])/g; | ||
@@ -79,6 +81,8 @@ const hyphenate = cacheStringFunction( | ||
}); | ||
const toHandlerKey = cacheStringFunction((str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
}); | ||
const toHandlerKey = cacheStringFunction( | ||
(str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
} | ||
); | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
@@ -466,7 +470,10 @@ const invokeArrayFns = (fns, ...arg) => { | ||
const isRef = (val) => { | ||
return !!(val && val["__v_isRef"] === true); | ||
}; | ||
const toDisplayString = (val) => { | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); | ||
}; | ||
const replacer = (_key, val) => { | ||
if (val && val["__v_isRef"]) { | ||
if (isRef(val)) { | ||
return replacer(_key, val.value); | ||
@@ -473,0 +480,0 @@ } else if (isMap(val)) { |
@@ -21,12 +21,7 @@ /** | ||
export declare const isOn: (key: string) => boolean; | ||
export declare const isModelListener: (key: string) => boolean; | ||
export declare const extend: { | ||
<T extends {}, U>(target: T, source: U): T & U; | ||
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; | ||
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; | ||
(target: object, ...sources: any[]): any; | ||
}; | ||
export declare const isModelListener: (key: string) => key is `onUpdate:${string}`; | ||
export declare const extend: typeof Object.assign; | ||
export declare const remove: <T>(arr: T[], el: T) => void; | ||
export declare const hasOwn: (val: object, key: string | symbol) => key is never; | ||
export declare const isArray: (arg: any) => arg is any[]; | ||
export declare const hasOwn: (val: object, key: string | symbol) => key is keyof typeof val; | ||
export declare const isArray: typeof Array.isArray; | ||
export declare const isMap: (val: unknown) => val is Map<any, any>; | ||
@@ -41,3 +36,3 @@ export declare const isSet: (val: unknown) => val is Set<any>; | ||
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>; | ||
export declare const objectToString: () => string; | ||
export declare const objectToString: typeof Object.prototype.toString; | ||
export declare const toTypeString: (value: unknown) => string; | ||
@@ -64,3 +59,3 @@ export declare const toRawType: (value: unknown) => string; | ||
*/ | ||
export declare const toHandlerKey: <T extends string>(str: T) => T extends "" ? "" : `on${Capitalize<T>}`; | ||
export declare const toHandlerKey: <T extends string>(str: T) => T extends '' ? '' : `on${Capitalize<T>}`; | ||
export declare const hasChanged: (value: any, oldValue: any) => boolean; | ||
@@ -236,7 +231,3 @@ export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void; | ||
*/ | ||
export declare const slotFlagsText: { | ||
1: string; | ||
2: string; | ||
3: string; | ||
}; | ||
export declare const slotFlagsText: Record<SlotFlags, string>; | ||
@@ -243,0 +234,0 @@ export declare const isGloballyAllowed: (key: string) => boolean; |
/** | ||
* @vue/shared-canary v3.20240715.0-minor.0 | ||
* @vue/shared-canary v3.20240812.0-minor.0 | ||
* (c) 2018-present Yuxi (Evan) You and Vue contributors | ||
@@ -64,5 +64,7 @@ * @license MIT | ||
const camelizeRE = /-(\w)/g; | ||
const camelize = cacheStringFunction((str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
}); | ||
const camelize = cacheStringFunction( | ||
(str) => { | ||
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); | ||
} | ||
); | ||
const hyphenateRE = /\B([A-Z])/g; | ||
@@ -75,6 +77,8 @@ const hyphenate = cacheStringFunction( | ||
}); | ||
const toHandlerKey = cacheStringFunction((str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
}); | ||
const toHandlerKey = cacheStringFunction( | ||
(str) => { | ||
const s = str ? `on${capitalize(str)}` : ``; | ||
return s; | ||
} | ||
); | ||
const hasChanged = (value, oldValue) => !Object.is(value, oldValue); | ||
@@ -462,7 +466,10 @@ const invokeArrayFns = (fns, ...arg) => { | ||
const isRef = (val) => { | ||
return !!(val && val["__v_isRef"] === true); | ||
}; | ||
const toDisplayString = (val) => { | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); | ||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); | ||
}; | ||
const replacer = (_key, val) => { | ||
if (val && val["__v_isRef"]) { | ||
if (isRef(val)) { | ||
return replacer(_key, val.value); | ||
@@ -469,0 +476,0 @@ } else if (isMap(val)) { |
{ | ||
"name": "@vue/shared-canary", | ||
"version": "3.20240715.0-minor.0", | ||
"version": "3.20240812.0-minor.0", | ||
"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
82072
1981