MCPcopy
hub / github.com/josdejong/mathjs / escape

Function escape

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

Source from the content-addressed store, hash-verified

146 * @return {string}
147 */
148export function escape (value) {
149 let text = String(value)
150 text = text.replace(/&/g, '&')
151 .replace(/"/g, '"')
152 .replace(/'/g, ''')
153 .replace(/</g, '&lt;')
154 .replace(/>/g, '&gt;')
155
156 return text
157}
158
159/**
160 * Recursively format an n-dimensional matrix

Callers 8

string.test.jsFile · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90
_toHTMLMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…