@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,293 lines (1,292 loc) • 1.66 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 {expand} ",
"range": [
115,
136
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 21
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
137,
145
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.expand",
"raw": "'Observable.prototype.expand'",
"range": [
146,
175
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 38
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
195,
204
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "expand(x => x === 8 ? empty : ——2*x—| )",
"raw": "'expand(x => x === 8 ? empty : \\u2014\\u20142*x\\u2014| )'",
"range": [
205,
261
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 70
}
}
}
],
"range": [
195,
262
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 71
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should recursively map-and-flatten each item to an Observable",
"raw": "'should recursively map-and-flatten each item to an Observable'",
"range": [
263,
326
],
"loc": {
"start": {
"line": 7,
"column": 72
},
"end": {
"line": 7,
"column": 135
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1",
"range": [
354,
356
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
359,
362
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--x----| ",
"raw": "'--x----| '",
"range": [
363,
375
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 33
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
379,
380
],
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 8,
"column": 38
}
}
},
"value": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
382,
383
],
"loc": {
"start": {
"line": 8,
"column": 40
},
"end": {
"line": 8,
"column": 41
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
379,
383
],
"loc": {
"start": {
"line": 8,
"column": 37
},
"end": {
"line": 8,
"column": 41
}
}
}
],
"range": [
377,
385
],
"loc": {
"start": {
"line": 8,
"column": 35
},
"end": {
"line": 8,
"column": 43
}
}
}
],
"range": [
359,
386
],
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 44
}
}
},
"range": [
354,
386
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 44
}
}
}
],
"kind": "var",
"range": [
350,
387
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e1subs",
"range": [
400,
406
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 18
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
409,
421
],
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 33
}
}
},
"range": [
400,
421
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 33
}
}
}
],
"kind": "var",
"range": [
396,
422
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 34
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "e2",
"range": [
435,
437
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 14
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "cold",
"range": [
440,
444
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 21
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--c| ",
"raw": "'--c| '",
"range": [
445,
455
],
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 32
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "c",
"range": [
459,
460
],
"loc": {
"start": {
"line": 10,
"column": 36
},
"end": {
"line": 10,
"column": 37
}
}
},
"value": {
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
462,
463
],
"loc": {
"start": {
"line": 10,
"column": 39
},
"end": {
"line": 10,
"column": 40
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
459,
463
],
"loc": {
"start": {
"line": 10,
"column": 36
},
"end": {
"line": 10,
"column": 40
}
}
}
],
"range": [
457,
465
],
"loc": {
"start": {
"line": 10,
"column": 34
},
"end": {
"line": 10,
"column": 42
}
}
}
],
"range": [
440,
466
],
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 43
}
}
},
"range": [
435,
466
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 43
}
}
}
],
"kind": "var",
"range": [
431,
467
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 44
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
480,
488
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "--a-b-c-d|",
"raw": "'--a-b-c-d|'",
"range": [
491,
503
],
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 35
}
}
},
"range": [
480,
503
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 35
}
}
}
],
"kind": "var",
"range": [
476,
504
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 36
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "values",
"range": [
517,
523
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 18
}
}
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "a",
"range": [
528,
529
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 24
}
}
},
"value": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
531,
532
],
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 27
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
528,
532
],
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 27
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "b",
"range": [
534,
535
],
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 30
}
}
},
"value": {
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
537,
538
],
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 33
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
534,
538
],
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 33
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "c",
"range": [
540,
541
],
"loc": {
"start": {
"line": 12,
"column": 35
},
"end": {
"line": 12,
"column": 36
}
}
},
"value": {
"type": "Literal",
"value": 4,
"raw": "4",
"range": [
543,
544
],
"loc": {
"start": {
"line": 12,
"column": 38
},
"end": {
"line": 12,
"column": 39
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
540,
544
],
"loc": {
"start": {
"line": 12,
"column": 35
},
"end": {
"line": 12,
"column": 39
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "d",
"range": [
546,
547
],
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 42
}
}
},
"value": {
"type": "Literal",
"value": 8,
"raw": "8",
"range": [
549,
550
],
"loc": {
"start": {
"line": 12,
"column": 44
},
"end": {
"line": 12,
"column": 45
}
}
},
"kind": "init",
"method": false,
"shorthand": false,