MCPcopy
hub / github.com/fanmingming/live / toString

Function toString

m3u8/vue.js:95–101  ·  view source on GitHub ↗

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

(val)

Source from the content-addressed store, hash-verified

93 * Convert a value to a string that is actually rendered.
94 */
95 function toString (val) {
96 return val == null
97 ? ''
98 : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
99 ? JSON.stringify(val, null, 2)
100 : String(val)
101 }
102
103 /**
104 * Convert an input value to a number for persistence.

Callers

nothing calls this directly

Calls 1

isPlainObjectFunction · 0.85

Tested by

no test coverage detected