@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,238 lines (1,237 loc) • 1.72 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": "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 {exhaustMap} ",
"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.exhaustMap",
"raw": "'Observable.prototype.exhaustMap'",
"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": "exhaustMap(i => 10*i——10*i——10*i—| )",
"raw": "'exhaustMap(i => 10*i\\u2014\\u201410*i\\u2014\\u201410*i\\u2014| )'",
"range": [
183,
246
],
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 77
}
}
}
],
"range": [
173,
247
],
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 78
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should map-and-flatten each item to an Observable",
"raw": "'should map-and-flatten each item to an Observable'",
"range": [
248,
299
],
"loc": {
"start": {
"line": 6,
"column": 79
},
"end": {
"line": 6,
"column": 130
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
327,
329
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
332,
335
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--1-----3--5-------|",
"raw": "'--1-----3--5-------|'",
"range": [
336,
358
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 43
}
}
}
],
"range": [
332,
359
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 44
}
}
},
"range": [
327,
359
],
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 44
}
}
}
],
"kind": "var",
"range": [
323,
360
],
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
373,
379
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
382,
404
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 43
}
}
},
"range": [
373,
404
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 43
}
}
}
],
"kind": "var",
"range": [
369,
405
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 44
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
418,
420
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
423,
427
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "x-x-x| ",
"raw": "'x-x-x| '",
"range": [
428,
450
],
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 44
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
454,
455
],
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 9,
"column": 49
}
}
},
"value": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
457,
459
],
"loc": {
"start": {
"line": 9,
"column": 51
},
"end": {
"line": 9,
"column": 53
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
454,
459
],
"loc": {
"start": {
"line": 9,
"column": 48
},
"end": {
"line": 9,
"column": 53
}
}
}
],
"range": [
452,
461
],
"loc": {
"start": {
"line": 9,
"column": 46
},
"end": {
"line": 9,
"column": 55
}
}
}
],
"range": [
423,
462
],
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 56
}
}
},
"range": [
418,
462
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 56
}
}
}
],
"kind": "var",
"range": [
414,
463
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 57
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
476,
484
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--x-x-x-y-y-y------|",
"raw": "'--x-x-x-y-y-y------|'",
"range": [
487,
509
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 45
}
}
},
"range": [
476,
509
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 45
}
}
}
],
"kind": "var",
"range": [
472,
510
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 46
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
523,
529
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
534,
535
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 24
}
}
},
"value": {
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
537,
539
],
"loc": {
"start": {
"line": 11,
"column": 26
},
"end": {
"line": 11,
"column": 28
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
534,
539
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 28
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "y",
"range": [
541,
542
],
"loc": {
"start": {
"line": 11,
"column": 30
},
"end": {
"line": 11,
"column": 31
}
}
},
"value": {
"type": "Literal",
"value": 30,
"raw": "30",
"range": [
544,
546
],
"loc": {
"start": {
"line": 11,
"column": 33
},
"end": {
"line": 11,
"column": 35
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
541,
546
],
"loc": {
"start": {
"line": 11,
"column": 30
},
"end": {
"line": 11,
"column": 35
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "z",
"range": [
548,
549
],
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 11,
"column": 38
}
}
},
"value": {
"type": "Literal",
"value": 50,
"raw": "50",
"range": [
551,
553
],
"loc": {
"start": {
"line": 11,
"column": 40
},
"end": {
"line": 11,
"column": 42
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
548,
553
],
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 11,
"column": 42
}
}
}
],
"range": [
532,
555
],
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 44
}
}
},
"range": [
523,
555
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 44
}
}
}
],
"kind": "var",
"range": [
519,
556
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "result",
"range": [
569,
575
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e1",
"range": [
578,
580
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"name": "exhaustMap",
"range": [
581,
591
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 34
}
}
},
"range": [
578,
591
],
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 34
}
}
},
"arguments": [
{
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
602,
603
],
"loc": {
"start": {
"line": 12,
"column": 45
},
"end": {
"line": 12,
"column": 46
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "e2",
"range": [
614,
616
],
"loc": {
"start": {
"line": 12,
"column": 57
},
"end": {
"line": 12,