MCPcopy Index your code
hub / github.com/josdejong/mathjs / stringify

Function stringify

src/utils/string.js:120–131  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

118 * @return {string}
119 */
120export function stringify (value) {
121 const text = String(value)
122 let escaped = ''
123 let i = 0
124 while (i < text.length) {
125 const c = text.charAt(i)
126 escaped += (c in controlCharacters) ? controlCharacters[c] : c
127 i++
128 }
129
130 return '"' + escaped + '"'
131}
132
133const controlCharacters = {
134 '"': '\\"',

Callers 5

_compileMethod · 0.90
forEachMethod · 0.90
mapMethod · 0.90
_toStringMethod · 0.90
_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…