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

Function toString

vue.js:114–122  ·  view source on GitHub ↗

* Convert a value to a string that is actually rendered.

(val)

Source from the content-addressed store, hash-verified

112 * Convert a value to a string that is actually rendered.
113 */
114 function toString(val) {
115
116 //将对象或者其他基本数据 变成一个 字符串
117 return val == null
118 ? ''
119 : typeof val === 'object'
120 ? JSON.stringify(val, null, 2)
121 : String(val)
122 }
123
124 /**
125 * Convert a input value to a number for persistence.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected