UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,322 lines 2.08 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 {mergeMapTo} ", "range": [ 115, 140 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 25 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 141, 149 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.mergeMapTo", "raw": "'Observable.prototype.mergeMapTo'", "range": [ 150, 183 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "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": [ 203, 212 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "mergeMapTo( 10——10——10—| )", "raw": "'mergeMapTo( 10\\u2014\\u201410\\u2014\\u201410\\u2014| )'", "range": [ 213, 266 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 67 } } } ], "range": [ 203, 267 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 68 } } }, "arguments": [ { "type": "Literal", "value": "should map-and-flatten each item to an Observable", "raw": "'should map-and-flatten each item to an Observable'", "range": [ 268, 319 ], "loc": { "start": { "line": 7, "column": 69 }, "end": { "line": 7, "column": 120 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 347, 349 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 352, 355 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--1-----3--5-------|", "raw": "'--1-----3--5-------|'", "range": [ 356, 378 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 43 } } } ], "range": [ 352, 379 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 44 } } }, "range": [ 347, 379 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 44 } } } ], "kind": "var", "range": [ 343, 380 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1subs", "range": [ 393, 399 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 402, 424 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 43 } } }, "range": [ 393, 424 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 43 } } } ], "kind": "var", "range": [ 389, 425 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 438, 440 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 443, 447 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": "x-x-x| ", "raw": "'x-x-x| '", "range": [ 448, 470 ], "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 44 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 474, 475 ], "loc": { "start": { "line": 10, "column": 48 }, "end": { "line": 10, "column": 49 } } }, "value": { "type": "Literal", "value": 10, "raw": "10", "range": [ 477, 479 ], "loc": { "start": { "line": 10, "column": 51 }, "end": { "line": 10, "column": 53 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 474, 479 ], "loc": { "start": { "line": 10, "column": 48 }, "end": { "line": 10, "column": 53 } } } ], "range": [ 472, 481 ], "loc": { "start": { "line": 10, "column": 46 }, "end": { "line": 10, "column": 55 } } } ], "range": [ 443, 482 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 56 } } }, "range": [ 438, 482 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } } } ], "kind": "var", "range": [ 434, 483 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 496, 504 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "--x-x-x-x-xxxx-x---|", "raw": "'--x-x-x-x-xxxx-x---|'", "range": [ 507, 529 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 45 } } }, "range": [ 496, 529 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 45 } } } ], "kind": "var", "range": [ 492, 530 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 543, 549 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 554, 555 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 24 } } }, "value": { "type": "Literal", "value": 10, "raw": "10", "range": [ 557, 559 ], "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 28 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 554, 559 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 28 } } } ], "range": [ 552, 561 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 30 } } }, "range": [ 543, 561 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 30 } } } ], "kind": "var", "range": [ 539, 562 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 31 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 575, 581 ], "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": [ 584, 586 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 23 } } }, "property": { "type": "Identifier", "name": "mergeMapTo", "range": [ 587, 597 ], "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 34 } } }, "range": [ 584, 597 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 34 } } }, "arguments": [ { "type": "Identifier", "name": "e2", "range": [ 598, 600 ], "loc": { "start": { "line": 13, "column": 35 }, "end": { "line": 13, "column": 37 } } } ], "range": [ 584, 601 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 38 } } }, "range": [ 575, 601 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 38 } } } ], "kind": "var", "range": [ 571, 602 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 39 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 611, 627 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 628, 634 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 31 } } } ], "range": [ 611, 635 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 636, 640 ], "loc": { "start":