MCPcopy Create free account
hub / github.com/angular-ui/ui-router / serializeScope

Function serializeScope

test/angular/1.5/angular-mocks.js:988–1003  ·  view source on GitHub ↗
(scope, offset)

Source from the content-addressed store, hash-verified

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

Callers 1

serializeFunction · 0.70

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected