MCPcopy
hub / github.com/angular-ui/ui-router / serializeScope

Function serializeScope

test/angular/1.4/angular-mocks.js:981–996  ·  view source on GitHub ↗
(scope, offset)

Source from the content-addressed store, hash-verified

979 }
980
981 function serializeScope(scope, offset) {
982 offset = offset || ' ';
983 var log = [offset + 'Scope(' + scope.$id + '): {'];
984 for (var key in scope) {
985 if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
986 log.push(' ' + key + ': ' + angular.toJson(scope[key]));
987 }
988 }
989 var child = scope.$$childHead;
990 while (child) {
991 log.push(serializeScope(child, offset + ' '));
992 child = child.$$nextSibling;
993 }
994 log.push('}');
995 return log.join('\n' + offset);
996 }
997};
998
999/**

Callers 1

serializeFunction · 0.70

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected