@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,287 lines (1,286 loc) • 804 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 {windowTime} ",
"range": [
85,
110
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 25
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
111,
119
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.windowTime",
"raw": "'Observable.prototype.windowTime'",
"range": [
120,
153
],
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 42
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
173,
182
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "windowTime(50, 100)",
"raw": "'windowTime(50, 100)'",
"range": [
183,
204
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 35
}
}
}
],
"range": [
173,
205
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 36
}
}
},
"arguments": [
{
"type": "BinaryExpression",
"operator": "+",
"left": {
"type": "Literal",
"value": "should emit windows given windowTimeSpan ",
"raw": "'should emit windows given windowTimeSpan '",
"range": [
206,
249
],
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 6,
"column": 80
}
}
},
"right": {
"type": "Literal",
"value": "and windowCreationInterval",
"raw": "'and windowCreationInterval'",
"range": [
260,
288
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 36
}
}
},
"range": [
206,
288
],
"loc": {
"start": {
"line": 6,
"column": 37
},
"end": {
"line": 7,
"column": 36
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
316,
322
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
325,
328
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 24
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1--2--^-a--b--c--d--e---f--g--h-|",
"raw": "'--1--2--^-a--b--c--d--e---f--g--h-|'",
"range": [
329,
366
],
"loc": {
"start": {
"line": 8,
"column": 25
},
"end": {
"line": 8,
"column": 62
}
}
}
],
"range": [
325,
367
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 63
}
}
},
"range": [
316,
367
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 63
}
}
}
],
"kind": "var",
"range": [
312,
368
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 64
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subs",
"range": [
381,
385
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
388,
417
],
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 48
}
}
},
"range": [
381,
417
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 48
}
}
}
],
"kind": "var",
"range": [
377,
418
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 49
}
},
"trailingComments": [
{
"type": "Line",
"value": " 100 frames 0---------1---------2-----|",
"range": [
427,
480
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 61
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
489,
521
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 40
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
530,
572
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 50
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
581,
633
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 60
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
646,
654
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "x---------y---------z-----|",
"raw": "'x---------y---------z-----|'",
"range": [
657,
686
],
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 52
}
}
},
"range": [
646,
686
],
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 52
}
}
}
],
"kind": "var",
"range": [
642,
687
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 53
}
},
"leadingComments": [
{
"type": "Line",
"value": " 100 frames 0---------1---------2-----|",
"range": [
427,
480
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 61
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
489,
521
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 40
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
530,
572
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 50
}
}
},
{
"type": "Line",
"value": " 50 ----|",
"range": [
581,
633
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 60
}
}
}
]
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "x",
"range": [
700,
701
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 13
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
704,
708
],
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--(b|) ",
"raw": "'--a--(b|) '",
"range": [
709,
738
],
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 50
}
}
}
],
"range": [
704,
739
],
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 51
}
}
},
"range": [
700,
739
],
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 51
}
}
}
],
"kind": "var",
"range": [
696,
740
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 52
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "y",
"range": [
753,
754
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 13
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
757,
761
],
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-d--e| ",
"raw": "'-d--e| '",
"range": [
762,
781
],
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 40
}
}
}
],
"range": [
757,
782
],
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 41
}
}
},
"range": [
753,
782
],
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 41
}
}
}
],
"kind": "var",
"range": [
749,
783
],
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 42
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "z",
"range": [
796,
797
],
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 13
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
800,
804
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-g--h| ",
"raw": "'-g--h| '",
"range": [
805,
814
],
"loc": {
"start": {
"line": 17,
"column": 21
},
"end": {
"line": 17,
"column": 30
}
}
}
],
"range": [
800,
815
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 31
}
}
},
"range": [
796,
815
],
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 31
}
}
}
],
"kind": "var",
"range": [
792,
816
],
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 32
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
829,
835
],
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
840,
841
],
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 24
}
}
},
"value": {
"type": "Identifier",
"name": "x",
"range": [
843,
844
],
"loc": {
"start": {
"line": 18,
"column": 26
},
"end": {
"line": 18,
"column": 27
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
840,
844
],
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 27
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "y",
"range": [
846,
847
],
"loc": {
"start": {