@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,353 lines (1,352 loc) • 1.19 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
}
},
"trailingComments": [
{
"type": "Block",
"value": "* @test {publishLast} ",
"range": [
115,
141
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 26
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
142,
150
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.publishLast",
"raw": "'Observable.prototype.publishLast'",
"range": [
151,
185
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 43
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
205,
214
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "publishLast",
"raw": "'publishLast'",
"range": [
215,
228
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 27
}
}
}
],
"range": [
205,
229
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 28
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should emit last notification of a simple source Observable",
"raw": "'should emit last notification of a simple source Observable'",
"range": [
230,
291
],
"loc": {
"start": {
"line": 7,
"column": 29
},
"end": {
"line": 7,
"column": 90
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
319,
325
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
328,
332
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 25
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1-2---3-4--5-|",
"raw": "'--1-2---3-4--5-|'",
"range": [
333,
351
],
"loc": {
"start": {
"line": 8,
"column": 26
},
"end": {
"line": 8,
"column": 44
}
}
}
],
"range": [
328,
352
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 45
}
}
},
"range": [
319,
352
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 45
}
}
}
],
"kind": "var",
"range": [
315,
353
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sourceSubs",
"range": [
366,
376
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 22
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
379,
397
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
366,
397
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 43
}
}
}
],
"kind": "var",
"range": [
362,
398
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "published",
"range": [
411,
420
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 21
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
423,
429
],
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"name": "publishLast",
"range": [
430,
441
],
"loc": {
"start": {
"line": 10,
"column": 31
},
"end": {
"line": 10,
"column": 42
}
}
},
"range": [
423,
441
],
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 42
}
}
},
"arguments": [],
"range": [
423,
443
],
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 44
}
}
},
"range": [
411,
443
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 44
}
}
}
],
"kind": "var",
"range": [
407,
444
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
457,
465
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "---------------(5|)",
"raw": "'---------------(5|)'",
"range": [
468,
489
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
457,
489
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"kind": "var",
"range": [
453,
490
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
499,
515
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "published",
"range": [
516,
525
],
"loc": {
"start": {
"line": 12,
"column": 25
},
"end": {
"line": 12,
"column": 34
}
}
}
],
"range": [
499,
526
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
527,
531
],
"loc": {
"start": {
"line": 12,
"column": 36
},
"end": {
"line": 12,
"column": 40
}
}
},
"range": [
499,
531
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 40
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
532,
540
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 49
}
}
}
],
"range": [
499,
541
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 50
}
}
},
"range": [
499,
542
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 51
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
551,
570
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
571,
577
],
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 34
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
578,
591
],
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 48
}
}
},
"range": [
571,
591
],
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 48
}
}
}
],
"range": [
551,
592
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 49
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
593,
597
],
"loc": {
"start": {
"line": 13,
"column": 50
},
"end": {
"line": 13,
"column": 54
}
}
},
"range": [
551,
597
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 54
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "sourceSubs",
"range": [
598,
608
],
"loc": {
"start": {
"line": 13,
"column": 55
},
"end": {
"line": 13,
"column": 65
}
}
}
],
"range": [
551,
609
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 66
}
}
},
"range": [
551,
610
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 67
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "published",
"range": [
619,
628
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 17
}
}
},
"property": {
"type": "Identifier",
"name": "connect",
"range": [
629,
636
],
"loc": {
"start": {
"line": 14,
"column": 18
},
"end": {
"line": 14,
"column": 25
}
}
},
"range": [
619,
636
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 25
}
}
},
"arguments": [],
"range": [
619,
638
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 27
}
}
},
"range": [
619,
639
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 28
}
}
}
],
"range": [
305,
645
],
"loc": {
"start": {
"line": 7,
"column": 104
},
"end": {
"line": 15,
"column": 5
}
}
},
"generator": false,
"expression": false,
"range": [
293,
645
],
"loc": {
"start": {
"line": 7,