@vue/shared
Advanced tools
Comparing version 3.0.0-rc.10 to 3.0.0-rc.11
@@ -341,2 +341,9 @@ 'use strict'; | ||
} | ||
function looseHas(set, val) { | ||
for (let item of set) { | ||
if (looseEqual(item, val)) | ||
return true; | ||
} | ||
return false; | ||
} | ||
@@ -355,3 +362,3 @@ /** | ||
const replacer = (_key, val) => { | ||
if (val instanceof Map) { | ||
if (isMap(val)) { | ||
return { | ||
@@ -364,3 +371,3 @@ [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { | ||
} | ||
else if (val instanceof Set) { | ||
else if (isSet(val)) { | ||
return { | ||
@@ -408,2 +415,4 @@ [`Set(${val.size})`]: [...val.values()] | ||
const isArray = Array.isArray; | ||
const isMap = (val) => toTypeString(val) === '[object Map]'; | ||
const isSet = (val) => toTypeString(val) === '[object Set]'; | ||
const isDate = (val) => val instanceof Date; | ||
@@ -423,3 +432,6 @@ const isFunction = (val) => typeof val === 'function'; | ||
const isPlainObject = (val) => toTypeString(val) === '[object Object]'; | ||
const isIntegerKey = (key) => isString(key) && key[0] !== '-' && '' + parseInt(key, 10) === key; | ||
const isIntegerKey = (key) => isString(key) && | ||
key !== 'NaN' && | ||
key[0] !== '-' && | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
@@ -515,2 +527,3 @@ 'onVnodeBeforeMount,onVnodeMounted,' + | ||
exports.isKnownAttr = isKnownAttr; | ||
exports.isMap = isMap; | ||
exports.isModelListener = isModelListener; | ||
@@ -525,2 +538,3 @@ exports.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp; | ||
exports.isSVGTag = isSVGTag; | ||
exports.isSet = isSet; | ||
exports.isSpecialBooleanAttr = isSpecialBooleanAttr; | ||
@@ -531,2 +545,3 @@ exports.isString = isString; | ||
exports.looseEqual = looseEqual; | ||
exports.looseHas = looseHas; | ||
exports.looseIndexOf = looseIndexOf; | ||
@@ -533,0 +548,0 @@ exports.makeMap = makeMap; |
@@ -341,2 +341,9 @@ 'use strict'; | ||
} | ||
function looseHas(set, val) { | ||
for (let item of set) { | ||
if (looseEqual(item, val)) | ||
return true; | ||
} | ||
return false; | ||
} | ||
@@ -355,3 +362,3 @@ /** | ||
const replacer = (_key, val) => { | ||
if (val instanceof Map) { | ||
if (isMap(val)) { | ||
return { | ||
@@ -364,3 +371,3 @@ [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { | ||
} | ||
else if (val instanceof Set) { | ||
else if (isSet(val)) { | ||
return { | ||
@@ -407,2 +414,4 @@ [`Set(${val.size})`]: [...val.values()] | ||
const isArray = Array.isArray; | ||
const isMap = (val) => toTypeString(val) === '[object Map]'; | ||
const isSet = (val) => toTypeString(val) === '[object Set]'; | ||
const isDate = (val) => val instanceof Date; | ||
@@ -422,3 +431,6 @@ const isFunction = (val) => typeof val === 'function'; | ||
const isPlainObject = (val) => toTypeString(val) === '[object Object]'; | ||
const isIntegerKey = (key) => isString(key) && key[0] !== '-' && '' + parseInt(key, 10) === key; | ||
const isIntegerKey = (key) => isString(key) && | ||
key !== 'NaN' && | ||
key[0] !== '-' && | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
@@ -514,2 +526,3 @@ 'onVnodeBeforeMount,onVnodeMounted,' + | ||
exports.isKnownAttr = isKnownAttr; | ||
exports.isMap = isMap; | ||
exports.isModelListener = isModelListener; | ||
@@ -524,2 +537,3 @@ exports.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp; | ||
exports.isSVGTag = isSVGTag; | ||
exports.isSet = isSet; | ||
exports.isSpecialBooleanAttr = isSpecialBooleanAttr; | ||
@@ -530,2 +544,3 @@ exports.isString = isString; | ||
exports.looseEqual = looseEqual; | ||
exports.looseHas = looseHas; | ||
exports.looseIndexOf = looseIndexOf; | ||
@@ -532,0 +547,0 @@ exports.makeMap = makeMap; |
@@ -79,2 +79,4 @@ | ||
export declare const isMap: (val: unknown) => val is Map<any, any>; | ||
export declare const isModelListener: (key: string) => boolean; | ||
@@ -97,2 +99,4 @@ | ||
export declare const isSet: (val: unknown) => val is Set<any>; | ||
export declare const isSpecialBooleanAttr: (key: string) => boolean; | ||
@@ -112,2 +116,4 @@ | ||
export declare function looseHas(set: Set<any>, val: any): boolean; | ||
export declare function looseIndexOf(arr: any[], val: any): number; | ||
@@ -114,0 +120,0 @@ |
@@ -337,2 +337,9 @@ /** | ||
} | ||
function looseHas(set, val) { | ||
for (let item of set) { | ||
if (looseEqual(item, val)) | ||
return true; | ||
} | ||
return false; | ||
} | ||
@@ -351,3 +358,3 @@ /** | ||
const replacer = (_key, val) => { | ||
if (val instanceof Map) { | ||
if (isMap(val)) { | ||
return { | ||
@@ -360,3 +367,3 @@ [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { | ||
} | ||
else if (val instanceof Set) { | ||
else if (isSet(val)) { | ||
return { | ||
@@ -405,2 +412,4 @@ [`Set(${val.size})`]: [...val.values()] | ||
const isArray = Array.isArray; | ||
const isMap = (val) => toTypeString(val) === '[object Map]'; | ||
const isSet = (val) => toTypeString(val) === '[object Set]'; | ||
const isDate = (val) => val instanceof Date; | ||
@@ -420,3 +429,6 @@ const isFunction = (val) => typeof val === 'function'; | ||
const isPlainObject = (val) => toTypeString(val) === '[object Object]'; | ||
const isIntegerKey = (key) => isString(key) && key[0] !== '-' && '' + parseInt(key, 10) === key; | ||
const isIntegerKey = (key) => isString(key) && | ||
key !== 'NaN' && | ||
key[0] !== '-' && | ||
'' + parseInt(key, 10) === key; | ||
const isReservedProp = /*#__PURE__*/ makeMap('key,ref,' + | ||
@@ -486,2 +498,2 @@ 'onVnodeBeforeMount,onVnodeMounted,' + | ||
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, isModelListener, isNoUnitNumericStyleProp, isObject, isOn, isPlainObject, isPromise, isReservedProp, isSSRSafeAttrName, isSVGTag, 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, looseHas, looseIndexOf, makeMap, normalizeClass, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, stringifyStyle, toDisplayString, toNumber, toRawType, toTypeString }; |
{ | ||
"name": "@vue/shared", | ||
"version": "3.0.0-rc.10", | ||
"version": "3.0.0-rc.11", | ||
"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
67360
1722