@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,322 lines • 1.69 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 {concatMapTo} ",
"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.concatMapTo",
"raw": "'Observable.prototype.concatMapTo'",
"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": "concatMapTo( 10——10——10—| )",
"raw": "'concatMapTo( 10\\u2014\\u201410\\u2014\\u201410\\u2014| )'",
"range": [
215,
269
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 68
}
}
}
],
"range": [
205,
270
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 69
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should map-and-flatten each item to an Observable",
"raw": "'should map-and-flatten each item to an Observable'",
"range": [
271,
322
],
"loc": {
"start": {
"line": 7,
"column": 70
},
"end": {
"line": 7,
"column": 121
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
350,
352
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
355,
358
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1-----3--5-------|",
"raw": "'--1-----3--5-------|'",
"range": [
359,
381
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 43
}
}
}
],
"range": [
355,
382
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 44
}
}
},
"range": [
350,
382
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 44
}
}
}
],
"kind": "var",
"range": [
346,
383
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
396,
402
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
405,
427
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 43
}
}
},
"range": [
396,
427
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 43
}
}
}
],
"kind": "var",
"range": [
392,
428
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
441,
443
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
446,
450
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "x-x-x| ",
"raw": "'x-x-x| '",
"range": [
451,
473
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 44
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
477,
478
],
"loc": {
"start": {
"line": 10,
"column": 48
},
"end": {
"line": 10,
"column": 49
}
}
},
"value": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
480,
482
],
"loc": {
"start": {
"line": 10,
"column": 51
},
"end": {
"line": 10,
"column": 53
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
477,
482
],
"loc": {
"start": {
"line": 10,
"column": 48
},
"end": {
"line": 10,
"column": 53
}
}
}
],
"range": [
475,
484
],
"loc": {
"start": {
"line": 10,
"column": 46
},
"end": {
"line": 10,
"column": 55
}
}
}
],
"range": [
446,
485
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 56
}
}
},
"range": [
441,
485
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 56
}
}
}
],
"kind": "var",
"range": [
437,
486
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 57
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
499,
507
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--x-x-x-x-x-xx-x-x-|",
"raw": "'--x-x-x-x-x-xx-x-x-|'",
"range": [
510,
532
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 45
}
}
},
"range": [
499,
532
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 45
}
}
}
],
"kind": "var",
"range": [
495,
533
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
546,
552
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
557,
558
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 24
}
}
},
"value": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
560,
562
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 28
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
557,
562
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 28
}
}
}
],
"range": [
555,
564
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 30
}
}
},
"range": [
546,
564
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 30
}
}
}
],
"kind": "var",
"range": [
542,
565
],
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 31
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
578,
584
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
587,
589
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "concatMapTo",
"range": [
590,
601
],
"loc": {
"start": {
"line": 13,
"column": 24
},
"end": {
"line": 13,
"column": 35
}
}
},
"range": [
587,
601
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 35
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "e2",
"range": [
602,
604
],
"loc": {
"start": {
"line": 13,
"column": 36
},
"end": {
"line": 13,
"column": 38
}
}
}
],
"range": [
587,
605
],
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 39
}
}
},
"range": [
578,
605
],
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 39
}
}
}
],
"kind": "var",
"range": [
574,
606
],
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 40
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
615,
631
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 24
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "result",
"range": [
632,
638
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 31
}
}
}
],
"range": [
615,
639
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
640,
644
],
"loc": {
"st