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

Function toJsonReplacer

test/angular/1.4/angular.js:1229–1243  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

1227
1228
1229function toJsonReplacer(key, value) {
1230 var val = value;
1231
1232 if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
1233 val = undefined;
1234 } else if (isWindow(value)) {
1235 val = '$WINDOW';
1236 } else if (value && document === value) {
1237 val = '$DOCUMENT';
1238 } else if (isScope(value)) {
1239 val = '$SCOPE';
1240 }
1241
1242 return val;
1243}
1244
1245
1246/**

Callers 1

serializeObjectFunction · 0.70

Calls 2

isWindowFunction · 0.70
isScopeFunction · 0.70

Tested by

no test coverage detected