MCPcopy Create free account
hub / github.com/ygs-code/vue / stringifyClass

Function stringifyClass

vue.js:7547–7561  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

7545
7546 //转码 class,把数组格式,对象格式的calss 全部转化成 字符串格式
7547 function stringifyClass(value) {
7548 if (Array.isArray(value)) { //如果是数组
7549 //数组变成字符串,然后用空格 隔开 拼接 起来变成字符串
7550 return stringifyArray(value)
7551 }
7552 if (isObject(value)) {
7553 return stringifyObject(value)
7554 }
7555 //直到全部转成 字符串才结束递归
7556 if (typeof value === 'string') {
7557 return value
7558 }
7559 /* istanbul ignore next */
7560 return ''
7561 }
7562
7563 //数组字符串变成字符串,然后用空格 隔开 拼接 起来变成字符串
7564 function stringifyArray(value) {

Callers 3

renderClassFunction · 0.85
stringifyArrayFunction · 0.85
updateClassFunction · 0.85

Calls 3

stringifyArrayFunction · 0.85
isObjectFunction · 0.85
stringifyObjectFunction · 0.85

Tested by

no test coverage detected