@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,340 lines (1,339 loc) • 1.22 MB
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": "chai_1",
"range": [
18,
24
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
27,
34
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
35,
41
],
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 27
}
}
}
],
"range": [
27,
42
],
"loc": {
"start": {
"line": 2,
"column": 13
},
"end": {
"line": 2,
"column": 28
}
}
},
"range": [
18,
42
],
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 28
}
}
}
],
"kind": "var",
"range": [
14,
43
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Rx",
"range": [
48,
50
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
53,
60
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
61,
80
],
"loc": {
"start": {
"line": 3,
"column": 17
},
"end": {
"line": 3,
"column": 36
}
}
}
],
"range": [
53,
81
],
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 37
}
}
},
"range": [
48,
81
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 37
}
}
}
],
"kind": "var",
"range": [
44,
82
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "test_helper_1",
"range": [
87,
100
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 17
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
103,
110
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 27
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../helpers/test-helper",
"raw": "'../helpers/test-helper'",
"range": [
111,
135
],
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 52
}
}
}
],
"range": [
103,
136
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 53
}
}
},
"range": [
87,
136
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 53
}
}
}
],
"kind": "var",
"range": [
83,
137
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 54
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
142,
152
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
155,
157
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
158,
168
],
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
155,
168
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
142,
168
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 30
}
}
}
],
"kind": "var",
"range": [
138,
169
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 31
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {withLatestFrom} ",
"range": [
170,
199
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 29
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
200,
208
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.withLatestFrom",
"raw": "'Observable.prototype.withLatestFrom'",
"range": [
209,
246
],
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 46
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
266,
275
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "withLatestFrom",
"raw": "'withLatestFrom'",
"range": [
276,
292
],
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 30
}
}
}
],
"range": [
266,
293
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 31
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should combine events from cold observables",
"raw": "'should combine events from cold observables'",
"range": [
294,
339
],
"loc": {
"start": {
"line": 8,
"column": 32
},
"end": {
"line": 8,
"column": 77
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
367,
369
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
372,
375
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-a--b-----c-d-e-|",
"raw": "'-a--b-----c-d-e-|'",
"range": [
376,
395
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 40
}
}
}
],
"range": [
372,
396
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 41
}
}
},
"range": [
367,
396
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 41
}
}
}
],
"kind": "var",
"range": [
363,
397
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 42
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
410,
412
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
415,
418
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1--2-3-4---| ",
"raw": "'--1--2-3-4---| '",
"range": [
419,
438
],
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 40
}
}
}
],
"range": [
415,
439
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 41
}
}
},
"range": [
410,
439
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 41
}
}
}
],
"kind": "var",
"range": [
406,
440
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 42
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
453,
461
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "----B-----C-D-E-|",
"raw": "'----B-----C-D-E-|'",
"range": [
464,
483
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 42
}
}
},
"range": [
453,
483
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 42
}
}
}
],
"kind": "var",
"range": [
449,
484
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 43
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
497,
503
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
506,
508
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "withLatestFrom",
"range": [
509,
523
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 38
}
}
},
"range": [
506,
523
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 38
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "e2",
"range": [
524,
526
],
"loc": {
"start": {
"line": 12,
"column": 39
},
"end": {
"line": 12,
"column": 41
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "a",
"range": [
538,
539
],
"loc": {
"start": {
"line": 12,
"column": 53
},
"end": {
"line": 12,
"column": 54
}
}
},
{
"type": "Identifier",
"name": "b",
"range": [
541,
542
],
"loc": {
"start": {
"line": 12,
"column": 56
},
"end": {
"line": 12,
"column": 57
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "BinaryExpression",
"operator": "+",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "String",
"range": [
553,
559
],
"loc": {
"start": {
"line": 12,
"column": 68
},
"end": {
"line": 12,
"column": 74
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "a",
"range": [
560,
561
],
"loc": {
"start": {
"line": 12,
"column": 75
},
"end": {
"line": 12,
"column": 76
}
}
}
],
"range": [
553,
562
],
"loc": {
"start": {
"line": 12,
"column": 68
},
"end": {
"line": 12,
"column": 77
}
}
},
"right": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "String",
"range": [
565,
571
],
"loc": {
"start": {
"line": 12,
"column": 80
},
"end": {
"line": 12,
"column": 86
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "b",
"range": [
572,
573
],
"loc": {
"start": {
"line": 12,
"column": 87
},
"end": {
"line": 12,
"column": 88
}
}
}
],
"range": [
565,
574
],
"loc": {
"start": {
"line": 12,
"column": 80
},
"end": {
"line": 12,
"column": 89
}
}
},
"range": [
553,
574
],
"loc": {
"start": {
"line": 12,
"column": 68
},
"end": {
"line": 12,
"column": 89
}
}
},
"range": [
546,
575
],
"loc": {
"start": {
"line": 12,
"column": 61
},
"end": {
"line": 12,
"column": 90
}
}
}
],
"range": [
544,
577
],
"loc": {
"start": {
"line": 12,
"column": 59
},
"end": {
"line": 12,
"column": 92
}
}
},
"generator": false,
"expression": false,
"range": [
528,
577
],
"loc": {
"start": {
"line": 12,
"column": 43
},
"end": {
"line": 12,
"column": 92
}
}
}
],
"range": [
506,
578
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 93
}
}
},
"range": [
497,
578
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 93
}
}
}
],
"kind": "var",
"range": [
493,
579
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 94
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
588,
604
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "result",
"range": [
605,
611
],
"loc": {
"start": {
"line": 13,