MCPcopy Create free account
hub / github.com/SimHacker/micropolis / quote

Function quote

turbogears/micropolis/htdocs/static/javascript/all_pretty.js:318–324  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

316 rep;
317
318 function quote(string) {
319 escapable.lastIndex = 0;
320 return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
321 var c = meta[a];
322 return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
323 }) + '"' : '"' + string + '"';
324 }
325 function str(key, holder) {
326 var i, k, v, length, mind = gap,
327 partial, value = holder[key];

Callers 1

strFunction · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected