(string)
| 218 | |
| 219 | |
| 220 | function quote(string) { |
| 221 | |
| 222 | // If the string contains no control characters, no quote characters, and no |
| 223 | // backslash characters, then we can safely slap some quotes around it. |
| 224 | // Otherwise we must also replace the offending characters with safe escape |
| 225 | // sequences. |
| 226 | |
| 227 | escapable.lastIndex = 0; |
| 228 | return escapable.test(string) ? |
| 229 | '"' + string.replace(escapable, function (a) { |
| 230 | var c = meta[a]; |
| 231 | return typeof c === 'string' ? c : |
| 232 | '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); |
| 233 | }) + '"' : |
| 234 | '"' + string + '"'; |
| 235 | } |
| 236 | |
| 237 | |
| 238 | function str(key, holder) { |
no outgoing calls
no test coverage detected
searching dependent graphs…