(string)
| 61 | |
| 62 | |
| 63 | function quote(string) { |
| 64 | |
| 65 | // If the string contains no control characters, no quote characters, and no |
| 66 | // backslash characters, then we can safely slap some quotes around it. |
| 67 | // Otherwise we must also replace the offending characters with safe escape |
| 68 | // sequences. |
| 69 | |
| 70 | escapable.lastIndex = 0; |
| 71 | return escapable.test(string) ? '"' + string.replace(escapable, function (a) { |
| 72 | var c = meta[a]; |
| 73 | return typeof c === 'string' |
| 74 | ? c |
| 75 | : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); |
| 76 | }) + '"' : '"' + string + '"'; |
| 77 | |
| 78 | } |
| 79 | |
| 80 | function str(key, holder) { |
| 81 |
no outgoing calls
no test coverage detected
searching dependent graphs…