MCPcopy Create free account
hub / github.com/RubyLouvre/anu / quote

Function quote

test/json3.js:420–429  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

418 };
419 var reEscape = /[\x00-\x1f\x22\x5c]/g;
420 var quote = function (value) {
421 reEscape.lastIndex = 0;
422 return '"' +
423 (
424 reEscape.test(value)
425 ? value.replace(reEscape, escapeChar)
426 : value
427 ) +
428 '"';
429 };
430
431 // Internal: Recursively serializes an object. Implements the
432 // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.

Callers 1

serializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected