UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,369 lines (1,368 loc) 2.51 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 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "queueScheduler", "range": [ 119, 133 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 18 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 136, 138 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 23 } } }, "property": { "type": "Identifier", "name": "Scheduler", "range": [ 139, 148 ], "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 33 } } }, "range": [ 136, 148 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 33 } } }, "property": { "type": "Identifier", "name": "queue", "range": [ 149, 154 ], "loc": { "start": { "line": 5, "column": 34 }, "end": { "line": 5, "column": 39 } } }, "range": [ 136, 154 ], "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 39 } } }, "range": [ 119, 154 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 39 } } } ], "kind": "var", "range": [ 115, 155 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 40 } }, "trailingComments": [ { "type": "Block", "value": "* @test {combineAll} ", "range": [ 156, 181 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 25 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 182, 190 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.combineAll", "raw": "'Observable.prototype.combineAll'", "range": [ 191, 224 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "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": [ 244, 253 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "combineAll", "raw": "'combineAll'", "range": [ 254, 266 ], "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 26 } } } ], "range": [ 244, 267 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 27 } } }, "arguments": [ { "type": "Literal", "value": "should combine events from two observables", "raw": "'should combine events from two observables'", "range": [ 268, 312 ], "loc": { "start": { "line": 8, "column": 28 }, "end": { "line": 8, "column": 72 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 340, 341 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 344, 348 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-a-----b---|", "raw": "'-a-----b---|'", "range": [ 349, 363 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 35 } } } ], "range": [ 344, 364 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 36 } } }, "range": [ 340, 364 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 36 } } } ], "kind": "var", "range": [ 336, 365 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 37 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 378, 379 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 382, 386 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--1-2-| ", "raw": "'--1-2-| '", "range": [ 387, 401 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 35 } } } ], "range": [ 382, 402 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 36 } } }, "range": [ 378, 402 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 36 } } } ], "kind": "var", "range": [ 374, 403 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 37 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "outer", "range": [ 416, 421 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 17 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 424, 427 ], "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 23 } } }, "arguments": [ { "type": "Literal", "value": "-x----y--------| ", "raw": "'-x----y--------| '", "range": [ 428, 457 ], "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 53 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 461, 462 ], "loc": { "start": { "line": 11, "column": 57 }, "end": { "line": 11, "column": 58 } } }, "value": { "type": "Identifier", "name": "x", "range": [ 464, 465 ], "loc": { "start": { "line": 11, "column": 60 }, "end": { "line": 11, "column": 61 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 461, 465 ], "loc": { "start": { "line": 11, "column": 57 }, "end": { "line": 11, "column": 61 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 467, 468 ], "loc": { "start": { "line": 11, "column": 63 }, "end": { "line": 11, "column": 64 } } }, "value": { "type": "Identifier", "name": "y", "range": [ 470, 471 ], "loc": { "start": { "line": 11, "column": 66 }, "end": { "line": 11, "column": 67 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 467, 471 ], "loc": { "start": { "line": 11, "column": 63 }, "end": { "line": 11, "column": 67 } } } ], "range": [ 459, 473 ], "loc": { "start": { "line": 11, "column": 55 }, "end": { "line": 11, "column": 69 } } } ], "range": [ 424, 474 ], "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 70 } } }, "range": [ 416, 474 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 70 } } } ], "kind": "var", "range": [ 412, 475 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 71 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 488, 496 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "Literal", "value": "-----------------A-B--C---|", "raw": "'-----------------A-B--C---|'", "range": [ 499, 528 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 52 } } }, "range": [ 488, 528 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 52 } } } ], "kind": "var", "range": [ 484, 529 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 53 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 542, 548 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "outer", "range": [ 551, 556 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 26 } } }, "property": { "type": "Identifier", "name": "combineAll", "range": [ 557, 567 ], "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 13, "column": 37 } } }, "range": [ 551, 567 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 37 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 578, 579 ], "loc": { "start": { "line": 13, "column": 48 }, "end": { "line": 13, "column": 49 } } }, { "type": "Identifier", "name": "b", "range": [ 581, 582 ], "loc": { "start": { "line": 13, "column": 51 }, "end": { "line": 13, "column": 52 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "+", "left": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "String", "range": [ 593, 599 ], "loc": { "start": { "line": 13, "column": 63 }, "end": { "line": 13, "column": 69 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 600, 601 ],