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

Function serializeScope

lib/test/angular/1.8.0/angular-mocks.js:1162–1177  ·  view source on GitHub ↗
(scope, offset)

Source from the content-addressed store, hash-verified

1160 }
1161
1162 function serializeScope(scope, offset) {
1163 offset = offset || ' ';
1164 var log = [offset + 'Scope(' + scope.$id + '): {'];
1165 for (var key in scope) {
1166 if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
1167 log.push(' ' + key + ': ' + angular.toJson(scope[key]));
1168 }
1169 }
1170 var child = scope.$$childHead;
1171 while (child) {
1172 log.push(serializeScope(child, offset + ' '));
1173 child = child.$$nextSibling;
1174 }
1175 log.push('}');
1176 return log.join('\n' + offset);
1177 }
1178};
1179
1180/**

Callers 1

serializeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected