@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,777 lines (1,776 loc) • 1.4 MB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "root",
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
},
"imported": {
"type": "Identifier",
"name": "root",
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
},
"range": [
9,
13
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/root",
"raw": "'../../util/root'",
"range": [
21,
38
],
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 38
}
}
},
"range": [
0,
39
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "tryCatch",
"range": [
49,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "tryCatch",
"range": [
49,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
},
"range": [
49,
57
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/tryCatch",
"raw": "'../../util/tryCatch'",
"range": [
65,
86
],
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 46
}
}
},
"range": [
40,
87
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 47
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "errorObject",
"range": [
97,
108
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "errorObject",
"range": [
97,
108
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
}
}
},
"range": [
97,
108
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "../../util/errorObject",
"raw": "'../../util/errorObject'",
"range": [
116,
140
],
"loc": {
"start": {
"line": 3,
"column": 28
},
"end": {
"line": 3,
"column": 52
}
}
},
"range": [
88,
141
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 53
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Observable",
"range": [
151,
161
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Observable",
"range": [
151,
161
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 19
}
}
},
"range": [
151,
161
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Observable",
"raw": "'../../Observable'",
"range": [
169,
187
],
"loc": {
"start": {
"line": 4,
"column": 27
},
"end": {
"line": 4,
"column": 45
}
}
},
"range": [
142,
188
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "Subscriber",
"range": [
198,
208
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 19
}
}
},
"imported": {
"type": "Identifier",
"name": "Subscriber",
"range": [
198,
208
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 19
}
}
},
"range": [
198,
208
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../../Subscriber",
"raw": "'../../Subscriber'",
"range": [
216,
234
],
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 45
}
}
},
"range": [
189,
235
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 46
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "MapOperator",
"range": [
245,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 20
}
}
},
"imported": {
"type": "Identifier",
"name": "MapOperator",
"range": [
245,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 20
}
}
},
"range": [
245,
256
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 20
}
}
}
],
"source": {
"type": "Literal",
"value": "../../operator/map",
"raw": "'../../operator/map'",
"range": [
264,
284
],
"loc": {
"start": {
"line": 6,
"column": 28
},
"end": {
"line": 6,
"column": 48
}
}
},
"range": [
236,
285
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 49
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "getCORSRequest",
"range": [
295,
309
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 23
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
322,
326
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "XMLHttpRequest",
"range": [
327,
341
],
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 27
}
}
},
"range": [
322,
341
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 27
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "xhr",
"range": [
357,
360
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 15
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
367,
371
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 26
}
}
},
"property": {
"type": "Identifier",
"name": "XMLHttpRequest",
"range": [
372,
386
],
"loc": {
"start": {
"line": 9,
"column": 27
},
"end": {
"line": 9,
"column": 41
}
}
},
"range": [
367,
386
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 41
}
}
},
"arguments": [],
"range": [
363,
388
],
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
357,
388
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 43
}
}
}
],
"kind": "var",
"range": [
353,
389
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
}
},
{
"type": "IfStatement",
"test": {
"type": "BinaryExpression",
"operator": "in",
"left": {
"type": "Literal",
"value": "withCredentials",
"raw": "'withCredentials'",
"range": [
402,
419
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 29
}
}
},
"right": {
"type": "Identifier",
"name": "xhr",
"range": [
423,
426
],
"loc": {
"start": {
"line": 10,
"column": 33
},
"end": {
"line": 10,
"column": 36
}
}
},
"range": [
402,
426
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 36
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "xhr",
"range": [
442,
445
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "withCredentials",
"range": [
446,
461
],
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 31
}
}
},
"range": [
442,
461
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 31
}
}
},
"right": {
"type": "UnaryExpression",
"operator": "!",
"argument": {
"type": "UnaryExpression",
"operator": "!",
"argument": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
466,
470
],
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 40
}
}
},
"property": {
"type": "Identifier",
"name": "withCredentials",
"range": [
471,
486
],
"loc": {
"start": {
"line": 11,
"column": 41
},
"end": {
"line": 11,
"column": 56
}
}
},
"range": [
466,
486
],
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 56
}
}
},
"prefix": true,
"range": [
465,
486
],
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 56
}
}
},
"prefix": true,
"range": [
464,
486
],
"loc": {
"start": {
"line": 11,
"column": 34
},
"end": {
"line": 11,
"column": 56
}
}
},
"range": [
442,
486
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 56
}
}
},
"range": [
442,
487
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 57
}
}
}
],
"range": [
428,
497
],
"loc": {
"start": {
"line": 10,
"column": 38
},
"end": {
"line": 12,
"column": 9
}
}
},
"alternate": null,
"range": [
398,
497
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 12,
"column": 9
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "Identifier",
"name": "xhr",
"range": [
513,
516
],
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 13,
"column": 18
}
}
},
"range": [
506,
517
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 19
}
}
}
],
"range": [
343,
523
],
"loc": {
"start": {
"line": 8,
"column": 29
},
"end": {
"line": 14,
"column": 5
}
}
},
"alternate": {
"type": "IfStatement",
"test": {
"type": "UnaryExpression",
"operator": "!",
"argument": {
"type": "UnaryExpression",
"operator": "!",
"argument": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
539,
543
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "XDomainRequest",
"range": [
544,
558
],
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 34
}
}
},
"range": [
539,
558
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 34
}
}
},
"prefix": true,
"range": [
538,
558
],
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 15,
"column": 34
}
}
},
"prefix": true,
"range": [
537,
558
],
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 34
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
581,
585
],
"loc": {
"start": {
"line": 16,
"column": 19
},
"end": {
"line": 16,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "XDomainRequest",
"range": [
586,
600
],
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 38
}
}
},
"range": [
581,
600
],
"loc": {
"start": {
"line": 16,
"column": 19
},
"end": {
"line": 16,
"column": 38
}
}
},
"arguments": [],
"range": [
577,
602
],
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 40
}
}
},
"range": [
570,
603
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 41
}
}
}
],
"range": [
560,
609
],
"loc": {
"start": {
"line": 15,
"column": 36
},
"end": {
"line": 17,
"column": 5
}
}
},
"alternate": {
"type": "BlockStatement",
"body": [
{
"type": "ThrowStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Error",
"range": [
639,
644
],
"loc": {
"start": {
"line": 19,
"column": 18
},
"end": {
"line": 19,
"column": 23
}
}
},
"arguments": [
{
"type": "Literal",
"value": "CORS is not supported by your browser",
"raw": "'CORS is not supported by your browser'",
"range": [
645,
684
],
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 63
}
}
}
],
"range": [
635,
685
],
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 64
}
}
},
"range": [
629,
686
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 65
}
}
}
],
"range": [
619,
692
],
"loc": {
"start": {
"line": 18,
"column": 9
},
"end": {
"line": 20,
"column": 5
}
}
},
"range": [
533,
692
],
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 20,
"column": 5
}
}
},
"range": [
318,
692
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 20,
"column": 5
}
}
}
],
"range": [
312,
694
],
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 21,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
286,
694
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 21,
"column": 1
}
}
},
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "getXMLHttpRequest",
"range": [
704,
721
],
"loc": {
"start": {
"line": 22,
"column": 9
},
"end": {
"line": 22,
"column": 26
}
}
},
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "IfStatement",
"test": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
734,
738
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"name": "XMLHttpRequest",
"range": [
739,
753
],
"loc": {
"start": {
"line": 23,
"column": 13
},
"end": {
"line": 23,
"column": 27
}
}
},
"range": [
734,
753
],
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 27
}
}
},
"consequent": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "root",
"range": [
776,
780
],
"loc": {
"start": {
"line": 24,
"column": 19
},
"end": {
"line": 24,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "XMLHttpRequest",
"range": [
781,
795
],
"loc": {
"start": {
"line": 24,
"column": 24
},
"end": {
"line": 24,
"column": 38
}
}
},
"range": [
776,
795
],
"loc": {
"start": {
"line": 24,
"column": 19
},
"end": {
"line": 24,
"column": 38
}
}
},
"arguments": [],
"range": [
772,
797
],
"loc": {
"start": {
"line": 24,
"column": 15
},
"end": {
"line": 24,
"column": 40
}
}
},
"range": [
765,
798
],
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 41
}
}
}
],
"range": [
755,
804
],
"loc": {
"start": {
"line": 23,
"column": 29
},
"end": {
"line": 25,
"column": 5
}
}
},
"alternate": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "progId",
"range": [
828,
834
],
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 27,
"column": 18
}
}
},
"init": {
"type": "UnaryExpression",
"operator": "void",
"argument": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
842,
843
],
"loc": {
"start": {
"line": 27,
"column": 26
},
"end": {
"line": 27,
"column": 27
}
}
},
"prefix": true,
"range": [
837,
843
],
"loc": {
"start": {
"line": 27,
"column": 21
},
"end": {
"line": 27,
"column": 27
}
}
},
"range": [
828,
843
],
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 27,
"column": 27
}
}
}
],
"kind": "var",
"range": [
824,
844
],
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 28
}
}
},
{
"type": "TryStatement",
"block": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "progIds",
"range": [
875,
882
],
"loc": {
"start": {
"line": 29,
"column": 16
},
"end": {
"line": 29,
"column": 23
}
}
},
"init": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": "Msxml2.XMLHTTP",
"raw": "'Msxml2.XMLHTTP'",
"range": [
886,
902
],
"loc": {
"start": {
"line": 29,
"column": 27
},
"end": {
"line": 29,
"column": 43
}
}
},
{
"type": "Literal",
"value": "Microsoft.XMLHTTP",