(string)
| 647 | '\\': '\\\\' |
| 648 | }; |
| 649 | function escapeString(string) { |
| 650 | |
| 651 | // If the string contains no control characters, no quote characters, and no |
| 652 | // backslash characters, then we can safely slap some quotes around it. |
| 653 | // Otherwise we must also replace the offending characters with safe escape |
| 654 | // sequences. |
| 655 | escapable.lastIndex = 0; |
| 656 | return escapable.test(string) ? '"' + string.replace(escapable, function (a) { |
| 657 | var c = meta[a]; |
| 658 | return typeof c === 'string' ? |
| 659 | c : |
| 660 | '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); |
| 661 | }) + '"' : '"' + string + '"'; |
| 662 | } |
| 663 | // End |
| 664 | |
| 665 | function internalStringify(holder, key, isTopLevel) { |
no test coverage detected
searching dependent graphs…