UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,333 lines 2.03 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 {mergeAll} ", "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.mergeAll", "raw": "'Observable.prototype.mergeAll'", "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": "mergeAll", "raw": "'mergeAll'", "range": [ 209, 219 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 24 } } } ], "range": [ 199, 220 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": "should merge a hot observable of cold observables", "raw": "'should merge a hot observable of cold observables'", "range": [ 221, 272 ], "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 77 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 300, 301 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 304, 308 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--a---b--c---d--| ", "raw": "'--a---b--c---d--| '", "range": [ 309, 334 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 46 } } } ], "range": [ 304, 335 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 47 } } }, "range": [ 300, 335 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 47 } } } ], "kind": "var", "range": [ 296, 336 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 48 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 349, 350 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 353, 357 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----e---f--g---|", "raw": "'----e---f--g---|'", "range": [ 358, 376 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 39 } } } ], "range": [ 353, 377 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 40 } } }, "range": [ 349, 377 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 40 } } } ], "kind": "var", "range": [ 345, 378 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 41 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 391, 393 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 396, 399 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--x------y-------| ", "raw": "'--x------y-------| '", "range": [ 400, 427 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 48 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 431, 432 ], "loc": { "start": { "line": 10, "column": 52 }, "end": { "line": 10, "column": 53 } } }, "value": { "type": "Identifier", "name": "x", "range": [ 434, 435 ], "loc": { "start": { "line": 10, "column": 55 }, "end": { "line": 10, "column": 56 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 431, 435 ], "loc": { "start": { "line": 10, "column": 52 }, "end": { "line": 10, "column": 56 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 437, 438 ], "loc": { "start": { "line": 10, "column": 58 }, "end": { "line": 10, "column": 59 } } }, "value": { "type": "Identifier", "name": "y", "range": [ 440, 441 ], "loc": { "start": { "line": 10, "column": 61 }, "end": { "line": 10, "column": 62 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 437, 441 ], "loc": { "start": { "line": 10, "column": 58 }, "end": { "line": 10, "column": 62 } } } ], "range": [ 429, 443 ], "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 64 } } } ], "range": [ 396, 444 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 65 } } }, "range": [ 391, 444 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 65 } } } ], "kind": "var", "range": [ 387, 445 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 66 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 458, 466 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "----a---b--c-e-d-f--g---|", "raw": "'----a---b--c-e-d-f--g---|'", "range": [ 469, 496 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 50 } } }, "range": [ 458, 496 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 50 } } } ], "kind": "var", "range": [ 454, 497 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 51 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 506, 522 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 523, 525 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 27 } } }, "property": { "type": "Identifier", "name": "mergeAll", "range": [ 526, 534 ], "loc": { "start": { "line": 12, "column": 28 }, "end": { "line": 12, "column": 36 } } }, "range": [ 523, 534 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 36 } } }, "arguments": [], "range": [ 523, 536 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 38 } } } ], "range": [ 506, 537 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 39 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 538, 542 ], "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 12, "column": 44 } } }, "range": [ 506, 542 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 44 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 543, 551 ], "loc": { "start": { "line": 12, "column": 45 }, "end": { "line": 12, "column": 53 } } } ], "range": [ 506, 552 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 54 } } }, "range": [ 506, 553 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 55 } } } ], "range": [ 286, 559 ], "loc": { "start": { "line": 7, "column": 91 }, "end": { "line": 13, "column": 5 } } }, "generator": false, "expression": false, "range": [ 274, 559 ], "loc": { "start": { "line": 7, "column": 79 }, "end": { "line": 13, "column": 5 } } } ], "range": [ 199, 560 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 13, "column": 6 } } }, "range": [ 199, 561 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 13, "column": 7 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression",