MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / serializeObject

Function serializeObject

web/static/bower_components/angular/angular.js:2246–2259  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

2244/* global: toDebugString: true */
2245
2246function serializeObject(obj) {
2247 var seen = [];
2248
2249 return JSON.stringify(obj, function(key, val) {
2250 val = toJsonReplacer(key, val);
2251 if (isObject(val)) {
2252
2253 if (seen.indexOf(val) >= 0) return '...';
2254
2255 seen.push(val);
2256 }
2257 return val;
2258 });
2259}
2260
2261function toDebugString(obj) {
2262 if (typeof obj === 'function') {

Callers 1

toDebugStringFunction · 0.85

Calls 2

toJsonReplacerFunction · 0.85
isObjectFunction · 0.85

Tested by

no test coverage detected