@vue/shared
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -386,3 +386,3 @@ 'use strict'; | ||
; | ||
const EMPTY_ARR = []; | ||
const EMPTY_ARR = Object.freeze([]) ; | ||
const NOOP = () => { }; | ||
@@ -427,3 +427,5 @@ /** | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
const isReservedProp = /*#__PURE__*/ makeMap( | ||
// the leading comma is intentional so empty string "" is also included | ||
',key,ref,' + | ||
'onVnodeBeforeMount,onVnodeMounted,' + | ||
@@ -450,11 +452,11 @@ 'onVnodeBeforeUpdate,onVnodeUpdated,' + | ||
*/ | ||
const hyphenate = cacheStringFunction((str) => { | ||
return str.replace(hyphenateRE, '-$1').toLowerCase(); | ||
}); | ||
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); | ||
/** | ||
* @private | ||
*/ | ||
const capitalize = cacheStringFunction((str) => { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}); | ||
const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); | ||
/** | ||
* @private | ||
*/ | ||
const toHandlerKey = cacheStringFunction((str) => (str ? `on${capitalize(str)}` : ``)); | ||
// compare whether a value has changed, accounting for NaN. | ||
@@ -545,4 +547,5 @@ const hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); | ||
exports.toDisplayString = toDisplayString; | ||
exports.toHandlerKey = toHandlerKey; | ||
exports.toNumber = toNumber; | ||
exports.toRawType = toRawType; | ||
exports.toTypeString = toTypeString; |
@@ -385,3 +385,3 @@ 'use strict'; | ||
const EMPTY_OBJ = {}; | ||
const EMPTY_ARR = []; | ||
const EMPTY_ARR = []; | ||
const NOOP = () => { }; | ||
@@ -426,3 +426,5 @@ /** | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
const isReservedProp = /*#__PURE__*/ makeMap( | ||
// the leading comma is intentional so empty string "" is also included | ||
',key,ref,' + | ||
'onVnodeBeforeMount,onVnodeMounted,' + | ||
@@ -449,11 +451,11 @@ 'onVnodeBeforeUpdate,onVnodeUpdated,' + | ||
*/ | ||
const hyphenate = cacheStringFunction((str) => { | ||
return str.replace(hyphenateRE, '-$1').toLowerCase(); | ||
}); | ||
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); | ||
/** | ||
* @private | ||
*/ | ||
const capitalize = cacheStringFunction((str) => { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}); | ||
const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); | ||
/** | ||
* @private | ||
*/ | ||
const toHandlerKey = cacheStringFunction((str) => (str ? `on${capitalize(str)}` : ``)); | ||
// compare whether a value has changed, accounting for NaN. | ||
@@ -544,4 +546,5 @@ const hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); | ||
exports.toDisplayString = toDisplayString; | ||
exports.toHandlerKey = toHandlerKey; | ||
exports.toNumber = toNumber; | ||
exports.toRawType = toRawType; | ||
exports.toTypeString = toTypeString; |
@@ -22,3 +22,3 @@ | ||
export declare const EMPTY_ARR: []; | ||
export declare const EMPTY_ARR: readonly never[]; | ||
@@ -211,2 +211,7 @@ export declare const EMPTY_OBJ: { | ||
/** | ||
* @private | ||
*/ | ||
export declare const toHandlerKey: (str: string) => string; | ||
export declare const toNumber: (val: any) => any; | ||
@@ -213,0 +218,0 @@ |
@@ -383,3 +383,3 @@ /** | ||
: {}; | ||
const EMPTY_ARR = []; | ||
const EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : []; | ||
const NOOP = () => { }; | ||
@@ -424,3 +424,5 @@ /** | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
const isReservedProp = /*#__PURE__*/ makeMap( | ||
// the leading comma is intentional so empty string "" is also included | ||
',key,ref,' + | ||
'onVnodeBeforeMount,onVnodeMounted,' + | ||
@@ -447,11 +449,11 @@ 'onVnodeBeforeUpdate,onVnodeUpdated,' + | ||
*/ | ||
const hyphenate = cacheStringFunction((str) => { | ||
return str.replace(hyphenateRE, '-$1').toLowerCase(); | ||
}); | ||
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); | ||
/** | ||
* @private | ||
*/ | ||
const capitalize = cacheStringFunction((str) => { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}); | ||
const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); | ||
/** | ||
* @private | ||
*/ | ||
const toHandlerKey = cacheStringFunction((str) => (str ? `on${capitalize(str)}` : ``)); | ||
// compare whether a value has changed, accounting for NaN. | ||
@@ -490,2 +492,2 @@ const hasChanged = (value, oldValue) => value !== oldValue && (value === value || oldValue === oldValue); | ||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, babelParserDefaultPlugins, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, invokeArrayFns, isArray, isBooleanAttr, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownAttr, isMap, isModelListener, isNoUnitNumericStyleProp, isObject, isOn, isPlainObject, isPromise, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, makeMap, normalizeClass, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, stringifyStyle, toDisplayString, toNumber, toRawType, toTypeString }; | ||
export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, babelParserDefaultPlugins, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, invokeArrayFns, isArray, isBooleanAttr, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownAttr, isMap, isModelListener, isNoUnitNumericStyleProp, isObject, isOn, isPlainObject, isPromise, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, makeMap, normalizeClass, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; |
{ | ||
"name": "@vue/shared", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"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
67675
1713