function serializeObject(obj, maxDepth) {
  var seen = [];

  // There is no direct way to stringify object until reaching a specific depth
  // and a very deep object can cause a performance issue, so we copy the object
  // based on this specific depth and then stringify it.
  if (isValidObjectMaxDepth(maxDepth)) {
    // This file is also included in `angular-loader`, so `copy()` might not always be available in
    // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed.
    obj = angular.copy(obj, null, maxDepth);
  }
  return JSON.stringify(obj, function(key, val) {
    val = toJsonReplacer(key, val);
    if (isObject(val)) {

      if (seen.indexOf(val) >= 0) return '...';

      seen.push(val);
    }
    return val;
  });
}
function serializeObject(obj, maxDepth) {
  var seen = [];

  
  
  
  if (isValidObjectMaxDepth(maxDepth)) {
    
    
    obj = angular.copy(obj, null, maxDepth);
  }
  return JSON.stringify(obj, function(key, val) {
    val = toJsonReplacer(key, val);
    if (isObject(val)) {

      if (seen.indexOf(val) >= 0) return '...';

      seen.push(val);
    }
    return val;
  });
}
function serializeObject ( obj , maxDepth ) { var seen = [ ] ; // There is no direct way to stringify object until reaching a specific depth // and a very deep object can cause a performance issue, so we copy the object // based on this specific depth and then stringify it. if ( isValidObjectMaxDepth ( maxDepth ) ) { // This file is also included in `angular-loader`, so `copy()` might not always be available in // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed. obj = angular . copy ( obj , null , maxDepth ) ; } return JSON . stringify ( obj , function ( key , val ) { val = toJsonReplacer ( key , val ) ; if ( isObject ( val ) ) { if ( seen . indexOf ( val ) >= 0 ) return '...' ; seen . push ( val ) ; } return val ; } ) ; }
/* exported toDebugString
/ * exported toDebugString