@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,422 lines (1,421 loc) • 362 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": "Scheduler",
"range": [
117,
126
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
129,
131
],
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"name": "Scheduler",
"range": [
132,
141
],
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"column": 28
}
}
},
"range": [
129,
141
],
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 28
}
}
},
"range": [
117,
141
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 28
}
}
}
],
"kind": "var",
"range": [
113,
142
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 29
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "queue",
"range": [
147,
152
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 9
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Scheduler",
"range": [
155,
164
],
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"name": "queue",
"range": [
165,
170
],
"loc": {
"start": {
"line": 6,
"column": 22
},
"end": {
"line": 6,
"column": 27
}
}
},
"range": [
155,
170
],
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 27
}
}
},
"range": [
147,
170
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 27
}
}
}
],
"kind": "var",
"range": [
143,
171
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 28
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {Scheduler} ",
"range": [
172,
196
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 24
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
197,
205
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Scheduler.queue",
"raw": "'Scheduler.queue'",
"range": [
206,
223
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 26
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
243,
245
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 6
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should act like the async scheduler if delay > 0",
"raw": "'should act like the async scheduler if delay > 0'",
"range": [
246,
296
],
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 57
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "actionHappened",
"range": [
324,
338
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 26
}
}
},
"init": {
"type": "Literal",
"value": false,
"raw": "false",
"range": [
341,
346
],
"loc": {
"start": {
"line": 10,
"column": 29
},
"end": {
"line": 10,
"column": 34
}
}
},
"range": [
324,
346
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 34
}
}
}
],
"kind": "var",
"range": [
320,
347
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 35
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sandbox",
"range": [
360,
367
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 19
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "sinon",
"range": [
370,
375
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"name": "sandbox",
"range": [
376,
383
],
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 35
}
}
},
"range": [
370,
383
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "create",
"range": [
384,
390
],
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 42
}
}
},
"range": [
370,
390
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 42
}
}
},
"arguments": [],
"range": [
370,
392
],
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
360,
392
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"kind": "var",
"range": [
356,
393
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "fakeTimer",
"range": [
406,
415
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 21
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "sandbox",
"range": [
418,
425
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "useFakeTimers",
"range": [
426,
439
],
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 45
}
}
},
"range": [
418,
439
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 45
}
}
},
"arguments": [],
"range": [
418,
441
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 47
}
}
},
"range": [
406,
441
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 47
}
}
}
],
"kind": "var",
"range": [
402,
442
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 48
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "queue",
"range": [
451,
456
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"property": {
"type": "Identifier",
"name": "schedule",
"range": [
457,
465
],
"loc": {
"start": {
"line": 13,
"column": 14
},
"end": {
"line": 13,
"column": 22
}
}
},
"range": [
451,
465
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 22
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "actionHappened",
"range": [
492,
506
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 26
}
}
},
"right": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
509,
513
],
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 33
}
}
},
"range": [
492,
513
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 33
}
}
},
"range": [
492,
514
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 34
}
}
}
],
"range": [
478,
524
],
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 15,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
466,
524
],
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 15,
"column": 9
}
}
},
{
"type": "Literal",
"value": 50,
"raw": "50",
"range": [
526,
528
],
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 13
}
}
}
],
"range": [
451,
529
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 15,
"column": 14
}
}
},
"range": [
451,
530
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 15,
"column": 15
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai_1",
"range": [
539,
545
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 14
}
}
},
"property": {
"type": "Identifier",
"name": "expect",
"range": [
546,
552
],
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 21
}
}
},
"range": [
539,
552
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 21
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "actionHappened",
"range": [
553,
567
],
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 36
}
}
}
],
"range": [
539,
568
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"name": "to",
"range": [
569,
571
],
"loc": {
"start": {
"line": 16,
"column": 38
},
"end": {
"line": 16,
"column": 40
}
}
},
"range": [
539,
571
],
"loc": {
"start": {
"line": 16,
"column": 8