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

Function serializeScope

test/angular/1.3/angular-mocks.js:924–939  ·  view source on GitHub ↗
(scope, offset)

Source from the content-addressed store, hash-verified

922 }
923
924 function serializeScope(scope, offset) {
925 offset = offset || ' ';
926 var log = [offset + 'Scope(' + scope.$id + '): {'];
927 for (var key in scope) {
928 if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
929 log.push(' ' + key + ': ' + angular.toJson(scope[key]));
930 }
931 }
932 var child = scope.$$childHead;
933 while (child) {
934 log.push(serializeScope(child, offset + ' '));
935 child = child.$$nextSibling;
936 }
937 log.push('}');
938 return log.join('\n' + offset);
939 }
940};
941
942/**

Callers 1

serializeFunction · 0.70

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected