UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,308 lines (1,307 loc) 3.8 MB
{ "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 {mergeMap} ", "range": [ 115, 138 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 23 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 139, 147 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.mergeMap", "raw": "'Observable.prototype.mergeMap'", "range": [ 148, 179 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 40 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 199, 208 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "mergeMap(i => 10*i——10*i——10*i—| )", "raw": "'mergeMap(i => 10*i\\u2014\\u201410*i\\u2014\\u201410*i\\u2014| )'", "range": [ 209, 270 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 75 } } } ], "range": [ 199, 271 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 76 } } }, "arguments": [ { "type": "Literal", "value": "should map-and-flatten each item to an Observable", "raw": "'should map-and-flatten each item to an Observable'", "range": [ 272, 323 ], "loc": { "start": { "line": 7, "column": 77 }, "end": { "line": 7, "column": 128 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 351, 353 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 356, 359 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--1-----3--5-------|", "raw": "'--1-----3--5-------|'", "range": [ 360, 382 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 43 } } } ], "range": [ 356, 383 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 44 } } }, "range": [ 351, 383 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 44 } } } ], "kind": "var", "range": [ 347, 384 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 397, 403 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 406, 428 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 43 } } }, "range": [ 397, 428 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 43 } } } ], "kind": "var", "range": [ 393, 429 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 442, 444 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 447, 451 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "x-x-x| ", "raw": "'x-x-x| '", "range": [ 452, 474 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 44 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 478, 479 ], "loc": { "start": { "line": 10, "column": 48 }, "end": { "line": 10, "column": 49 } } }, "value": { "type": "Literal", "value": 10, "raw": "10", "range": [ 481, 483 ], "loc": { "start": { "line": 10, "column": 51 }, "end": { "line": 10, "column": 53 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 478, 483 ], "loc": { "start": { "line": 10, "column": 48 }, "end": { "line": 10, "column": 53 } } } ], "range": [ 476, 485 ], "loc": { "start": { "line": 10, "column": 46 }, "end": { "line": 10, "column": 55 } } } ], "range": [ 447, 486 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 56 } } }, "range": [ 442, 486 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } } } ], "kind": "var", "range": [ 438, 487 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 500, 508 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "--x-x-x-y-yzyz-z---|", "raw": "'--x-x-x-y-yzyz-z---|'", "range": [ 511, 533 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 45 } } }, "range": [ 500, 533 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 45 } } } ], "kind": "var", "range": [ 496, 534 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 547, 553 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 558, 559 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 24 } } }, "value": { "type": "Literal", "value": 10, "raw": "10", "range": [ 561, 563 ], "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 28 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 558, 563 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 28 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 565, 566 ], "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 31 } } }, "value": { "type": "Literal", "value": 30, "raw": "30", "range": [ 568, 570 ], "loc": { "start": { "line": 12, "column": 33 }, "end": { "line": 12, "column": 35 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 565, 570 ], "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 35 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "z", "range": [ 572, 573 ], "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 38 } } }, "value": { "type": "Literal", "value": 50, "raw": "50", "range": [ 575, 577 ], "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 12, "column": 42 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 572, 577 ], "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 42 } } } ], "range": [ 556, 579 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 44 } } }, "range": [ 547, 579 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 44 } } } ], "kind": "var", "range": [ 543, 580 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 593, 599 ], "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": [ 602, 604 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 23 } } }, "property": { "type": "Identifier", "name": "mergeMap", "range": [ 605, 613 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 32 } } }, "range": [ 602, 613 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 32 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier",