* Convert a value to a string that is actually rendered.
(val)
| 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. |
nothing calls this directly
no outgoing calls
no test coverage detected