@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,436 lines (1,435 loc) • 3.15 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": "Observable",
"range": [
87,
97
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 14
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
100,
102
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"name": "Observable",
"range": [
103,
113
],
"loc": {
"start": {
"line": 4,
"column": 20
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
100,
113
],
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 30
}
}
},
"range": [
87,
113
],
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 30
}
}
}
],
"kind": "var",
"range": [
83,
114
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "Subject",
"range": [
119,
126
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 11
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
129,
131
],
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"name": "Subject",
"range": [
132,
139
],
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 24
}
}
},
"range": [
129,
139
],
"loc": {
"start": {
"line": 5,
"column": 14
},
"end": {
"line": 5,
"column": 24
}
}
},
"range": [
119,
139
],
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 24
}
}
}
],
"kind": "var",
"range": [
115,
140
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 25
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
145,
158
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 17
}
}
},
"init": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "Rx",
"range": [
161,
163
],
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"name": "ReplaySubject",
"range": [
164,
177
],
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 36
}
}
},
"range": [
161,
177
],
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 36
}
}
},
"range": [
145,
177
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 36
}
}
}
],
"kind": "var",
"range": [
141,
178
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 37
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {multicast} ",
"range": [
179,
203
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 24
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
204,
212
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.multicast",
"raw": "'Observable.prototype.multicast'",
"range": [
213,
245
],
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 41
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
265,
274
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "multicast(() => new Subject())",
"raw": "'multicast(() => new Subject())'",
"range": [
275,
307
],
"loc": {
"start": {
"line": 9,
"column": 14
},
"end": {
"line": 9,
"column": 46
}
}
}
],
"range": [
265,
308
],
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 47
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should mirror a simple source Observable",
"raw": "'should mirror a simple source Observable'",
"range": [
309,
351
],
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 9,
"column": 90
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
379,
385
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
388,
392
],
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 25
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1-2---3-4--5-|",
"raw": "'--1-2---3-4--5-|'",
"range": [
393,
411
],
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 44
}
}
}
],
"range": [
388,
412
],
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 45
}
}
},
"range": [
379,
412
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 45
}
}
}
],
"kind": "var",
"range": [
375,
413
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sourceSubs",
"range": [
426,
436
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 22
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
439,
457
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 43
}
}
},
"range": [
426,
457
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 43
}
}
}
],
"kind": "var",
"range": [
422,
458
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 44
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "multicasted",
"range": [
471,
482
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 23
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
485,
491
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "multicast",
"range": [
492,
501
],
"loc": {
"start": {
"line": 12,
"column": 33
},
"end": {
"line": 12,
"column": 42
}
}
},
"range": [
485,
501
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 42
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Subject",
"range": [
527,
534
],
"loc": {
"start": {
"line": 12,
"column": 68
},
"end": {
"line": 12,
"column": 75
}
}
},
"arguments": [],
"range": [
523,
536
],
"loc": {
"start": {
"line": 12,
"column": 64
},
"end": {
"line": 12,
"column": 77
}
}
},
"range": [
516,
537
],
"loc": {
"start": {
"line": 12,
"column": 57
},
"end": {
"line": 12,
"column": 78
}
}
}
],
"range": [
514,
539
],
"loc": {
"start": {
"line": 12,
"column": 55
},
"end": {
"line": 12,
"column": 80
}
}
},
"generator": false,
"expression": false,
"range": [
502,
539
],
"loc": {
"start": {
"line": 12,
"column": 43
},
"end": {
"line": 12,
"column": 80
}
}
}
],
"range": [
485,
540
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 81
}
}
},
"range": [
471,
540
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 81
}
}
}
],
"kind": "var",
"range": [
467,
541
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 82
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
554,
562
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--1-2---3-4--5-|",
"raw": "'--1-2---3-4--5-|'",
"range": [
565,
583
],
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 41
}
}
},
"range": [
554,
583
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 41
}
}
}
],
"kind": "var",
"range": [
550,
584
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 42
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
593,
609
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "multicasted",
"range": [
610,
621
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 36
}
}
}
],
"range": [
593,
622
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
623,
627
],
"loc": {
"start": {
"line": 14,
"column": 38
},
"end": {
"line": 14,
"column": 42
}
}
},
"range": [
593,
627
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 42
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
628,
636
],
"loc": {
"start": {
"line": 14,
"column": 43
},
"end": {
"line": 14,
"column": 51
}
}
}
],
"range": [
593,
637
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 52
}
}
},
"range": [
593,
638
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 53
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
647,
666
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
667,
673
],
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 34
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
674,
687
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 48
}
}