(obj)
| 2431 | /* global toDebugString: true */ |
| 2432 | |
| 2433 | function serializeObject(obj) { |
| 2434 | var seen = []; |
| 2435 | |
| 2436 | return JSON.stringify(obj, function(key, val) { |
| 2437 | val = toJsonReplacer(key, val); |
| 2438 | if (isObject(val)) { |
| 2439 | |
| 2440 | if (seen.indexOf(val) >= 0) return '...'; |
| 2441 | |
| 2442 | seen.push(val); |
| 2443 | } |
| 2444 | return val; |
| 2445 | }); |
| 2446 | } |
| 2447 | |
| 2448 | function toDebugString(obj) { |
| 2449 | if (typeof obj === 'function') { |
no test coverage detected