@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,567 lines (1,566 loc) • 762 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": "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": "sinon",
"range": [
48,
53
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 9
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
56,
63
],
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 19
}
}
},
"arguments": [
{
"type": "Literal",
"value": "sinon",
"raw": "'sinon'",
"range": [
64,
71
],
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 27
}
}
}
],
"range": [
56,
72
],
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 28
}
}
},
"range": [
48,
72
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 28
}
}
}
],
"kind": "var",
"range": [
44,
73
],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Rx",
"range": [
78,
80
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 6
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require",
"range": [
83,
90
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 16
}
}
},
"arguments": [
{
"type": "Literal",
"value": "../../dist/cjs/Rx",
"raw": "'../../dist/cjs/Rx'",
"range": [
91,
110
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 36
}
}
}
],
"range": [
83,
111
],
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 37
}
}
},
"range": [
78,
111
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 37
}
}
}
],
"kind": "var",
"range": [
74,
112
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 38
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Observable",
"range": [
117,
127
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
130,
132
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
133,
143
],
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
130,
143
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 30
}
}
},
"range": [
117,
143
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 30
}
}
}
],
"kind": "var",
"range": [
113,
144
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "asap",
"range": [
149,
153
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 8
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
156,
158
],
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 13
}
}
},
"property": {
"type": "Identifier",
"name": "Scheduler",
"range": [
159,
168
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 23
}
}
},
"range": [
156,
168
],
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "asap",
"range": [
169,
173
],
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 6,
"column": 28
}
}
},
"range": [
156,
173
],
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 28
}
}
},
"range": [
149,
173
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 28
}
}
}
],
"kind": "var",
"range": [
145,
174
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "queue",
"range": [
179,
184
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 9
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
187,
189
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "Scheduler",
"range": [
190,
199
],
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 24
}
}
},
"range": [
187,
199
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"name": "queue",
"range": [
200,
205
],
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 30
}
}
},
"range": [
187,
205
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 30
}
}
},
"range": [
179,
205
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 30
}
}
}
],
"kind": "var",
"range": [
175,
206
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "animationFrame",
"range": [
211,
225
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
228,
230
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "Scheduler",
"range": [
231,
240
],
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 33
}
}
},
"range": [
228,
240
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 33
}
}
},
"property": {
"type": "Identifier",
"name": "animationFrame",
"range": [
241,
255
],
"loc": {
"start": {
"line": 8,
"column": 34
},
"end": {
"line": 8,
"column": 48
}
}
},
"range": [
228,
255
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 48
}
}
},
"range": [
211,
255
],
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 48
}
}
}
],
"kind": "var",
"range": [
207,
256
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 49
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {interval} ",
"range": [
257,
280
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 23
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
281,
289
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 10,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.interval",
"raw": "'Observable.interval'",
"range": [
290,
311
],
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 30
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
331,
340
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "interval(1000)",
"raw": "'interval(1000)'",
"range": [
341,
357
],
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 30
}
}
}
],
"range": [
331,
358
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 31
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should create an observable emitting periodically",
"raw": "'should create an observable emitting periodically'",
"range": [
359,
410
],
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 83
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
438,
440
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
443,
453
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "interval",
"range": [
454,
462
],
"loc": {
"start": {
"line": 12,
"column": 28
},
"end": {
"line": 12,
"column": 36
}
}
},
"range": [
443,
462
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 36
}
}
},
"arguments": [
{
"type": "Literal",
"value": 20,
"raw": "20",
"range": [
463,
465
],
"loc": {
"start": {
"line": 12,
"column": 37
},
"end": {
"line": 12,
"column": 39
}
}
},
{
"type": "Identifier",
"name": "rxTestScheduler",
"range": [
467,
482
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 56
}
}
}
],
"range": [
443,
483
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 57
}
}
},
"property": {
"type": "Identifier",
"name": "take",
"range": [
497,
501
],
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 17
}
}
},
"range": [
443,
501
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 13,
"column": 17
}
}
},
"arguments": [
{
"type": "Literal",
"value": 6,
"raw": "6",
"range": [
502,
503
],
"loc": {
"start": {
"line": 13,
"column": 18
},
"end": {
"line": 13,
"column": 19
}
}
}
],
"range": [
443,
504
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 13,
"column": 20
}
},
"trailingComments": [
{
"type": "Line",
"value": " make it actually finite, so it can be rendered",
"range": [
505,
554
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 70
}
}
}
]
},
"property": {
"type": "Identifier",
"name": "concat",
"range": [
568,
574
],
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 19
}
},
"leadingComments": [
{
"type": "Line",
"value": " make it actually finite, so it can be rendered",
"range": [
505,
554
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 70
}
}
}
]
},
"range": [
443,
574
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 14,
"column": 19
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Observable",
"range": [
575,
585
],
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "never",
"range": [
586,
591
],
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 36
}
}
},
"range": [
575,
591
],
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 36
}
}
},
"arguments": [],
"range": [
575,
593
],
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 38
}
}
}
],
"range": [
443,
594
],
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 14,
"column": 39
}
}
},
"range": [
438,
594
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 14,
"column": 39
}
}
}
],
"kind": "var",
"range": [
434,
595
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 14,
"column": 40
}
},
"trailingComments": [
{
"type": "Line",
"value": " but pretend it's infinite by not completing",
"range": [
596,
642
],
"loc": {
"start": {
"line": 14,
"column": 41
},
"end": {
"line": 14,
"column": 87
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
655,
663
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--a-b-c-d-e-f-",
"raw": "'--a-b-c-d-e-f-'",
"range": [
666,
682
],
"loc": {
"start": {
"line": 15,
"column": 23
},
"end": {
"line": 15,
"column": 39
}
}
},
"range": [
655,
682
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 39
}
}
}
],
"kind": "var",
"range": [
651,
683
],
"loc": {
"start": {
"line": 15,
"column": 8
},