@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,302 lines (1,301 loc) • 881 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
0,
12
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 12
}
}
},
"range": [
0,
13
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 13
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Rx",
"range": [
18,
20
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
23,
30
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
31,
50
],
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 36
}
}
}
],
"range": [
23,
51
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 37
}
}
},
"range": [
18,
51
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 37
}
}
}
],
"kind": "var",
"range": [
14,
52
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
57,
67
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
70,
72
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
73,
83
],
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
70,
83
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 30
}
}
},
"range": [
57,
83
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 30
}
}
}
],
"kind": "var",
"range": [
53,
84
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {distinctUntilChanged} ",
"range": [
85,
120
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 35
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
121,
129
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.distinctUntilChanged",
"raw": "'Observable.prototype.distinctUntilChanged'",
"range": [
130,
173
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 52
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
193,
202
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "distinctUntilChanged",
"raw": "'distinctUntilChanged'",
"range": [
203,
225
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 36
}
}
}
],
"range": [
193,
226
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 37
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should distinguish between values",
"raw": "'should distinguish between values'",
"range": [
227,
262
],
"loc": {
"start": {
"line": 6,
"column": 38
},
"end": {
"line": 6,
"column": 73
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
290,
292
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
295,
298
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-1--2-2----1-3-|",
"raw": "'-1--2-2----1-3-|'",
"range": [
299,
317
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 39
}
}
}
],
"range": [
295,
318
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 40
}
}
},
"range": [
290,
318
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 40
}
}
}
],
"kind": "var",
"range": [
286,
319
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 41
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
332,
340
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-1--2------1-3-|",
"raw": "'-1--2------1-3-|'",
"range": [
343,
361
],
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 41
}
}
},
"range": [
332,
361
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 41
}
}
}
],
"kind": "var",
"range": [
328,
362
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 42
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
371,
387
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
388,
390
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "distinctUntilChanged",
"range": [
391,
411
],
"loc": {
"start": {
"line": 9,
"column": 28
},
"end": {
"line": 9,
"column": 48
}
}
},
"range": [
388,
411
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 48
}
}
},
"arguments": [],
"range": [
388,
413
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 50
}
}
}
],
"range": [
371,
414
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 51
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
415,
419
],
"loc": {
"start": {
"line": 9,
"column": 52
},
"end": {
"line": 9,
"column": 56
}
}
},
"range": [
371,
419
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 56
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
420,
428
],
"loc": {
"start": {
"line": 9,
"column": 57
},
"end": {
"line": 9,
"column": 65
}
}
}
],
"range": [
371,
429
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 66
}
}
},
"range": [
371,
430
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 67
}
}
}
],
"range": [
276,
436
],
"loc": {
"start": {
"line": 6,
"column": 87
},
"end": {
"line": 10,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
264,
436
],
"loc": {
"start": {
"line": 6,
"column": 75
},
"end": {
"line": 10,
"column": 5
}
}
}
],
"range": [
193,
437
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 10,
"column": 6
}
}
},
"range": [
193,
438
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 10,
"column": 7
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
443,
445
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should distinguish between values",
"raw": "'should distinguish between values'",
"range": [
446,
481
],
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 42
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
509,
511
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
514,
517
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--a--a--b--b--a--|",
"raw": "'--a--a--a--b--b--a--|'",
"range": [
518,
541
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 44
}
}
}
],
"range": [
514,
542
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 45
}
}
},
"range": [
509,
542
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 45
}
}
}
],
"kind": "var",
"range": [
505,
543
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
556,
562
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
565,
588
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 44
}
}
},
"range": [
556,
588
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 44
}
}
}
],
"kind": "var",
"range": [
552,
589
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
602,
610
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--a--------b-----a--|",
"raw": "'--a--------b-----a--|'",
"range": [
613,
636
],
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 46
}
}
},
"range": [
602,
636
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 46
}
}
}
],
"kind": "var",
"range": [
598,
637
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 47
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
646,
662
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
663,
665
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "distinctUntilChanged",
"range": [
666,
686
],
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 48
}
}
},
"range": [
663,
686
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 48
}
}
},
"arguments": [],
"range": [
663,
688
],
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 50
}
}
}
],
"range": [
646,
689
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 51
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
690,
694
],
"loc": {
"start": {
"line": 15,
"column": 52
},
"end": {
"line": 15,