MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / toJsonReplacer

Function toJsonReplacer

code/songhop/www/lib/angular/angular.js:1003–1017  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

1001
1002
1003function toJsonReplacer(key, value) {
1004 var val = value;
1005
1006 if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
1007 val = undefined;
1008 } else if (isWindow(value)) {
1009 val = '$WINDOW';
1010 } else if (value && document === value) {
1011 val = '$DOCUMENT';
1012 } else if (isScope(value)) {
1013 val = '$SCOPE';
1014 }
1015
1016 return val;
1017}
1018
1019
1020/**

Callers 1

serializeObjectFunction · 0.70

Calls 2

isWindowFunction · 0.70
isScopeFunction · 0.70

Tested by

no test coverage detected