MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / escapeValue

Function escapeValue

MathBox/parser.js:81–93  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

79 };
80
81 function escapeValue(v) {
82 if (typeof v === "string") {
83 escapable.lastIndex = 0;
84 return escapable.test(v) ?
85 "'" + v.replace(escapable, function (a) {
86 var c = meta[a];
87 return typeof c === 'string' ? c :
88 '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
89 }) + "'" :
90 "'" + v + "'";
91 }
92 return v;
93 }
94
95 function hasValue(values, index) {
96 var parts = index.split(/\./);

Callers 1

parser.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected