UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,308 lines (1,307 loc) 2.01 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 {bufferToggle} ", "range": [ 115, 142 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 27 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 143, 151 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.bufferToggle", "raw": "'Observable.prototype.bufferToggle'", "range": [ 152, 187 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 44 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 207, 216 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "bufferToggle", "raw": "'bufferToggle'", "range": [ 217, 231 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 28 } } } ], "range": [ 207, 232 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 29 } } }, "arguments": [ { "type": "Literal", "value": "should emit buffers using hot openings and hot closings", "raw": "'should emit buffers using hot openings and hot closings'", "range": [ 233, 290 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 87 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 318, 320 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 323, 326 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---a---b---c---d---e---f---g---|", "raw": "'---a---b---c---d---e---f---g---|'", "range": [ 327, 361 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 55 } } } ], "range": [ 323, 362 ], "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 8, "column": 56 } } }, "range": [ 318, 362 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 56 } } } ], "kind": "var", "range": [ 314, 363 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e2", "range": [ 376, 378 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 381, 384 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--o------------------o---------|", "raw": "'--o------------------o---------|'", "range": [ 385, 419 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 55 } } } ], "range": [ 381, 420 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 56 } } }, "range": [ 376, 420 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 56 } } } ], "kind": "var", "range": [ 372, 421 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e3", "range": [ 434, 436 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 439, 442 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---------c---------------c-----|", "raw": "'---------c---------------c-----|'", "range": [ 443, 477 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 55 } } } ], "range": [ 439, 478 ], "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 10, "column": 56 } } }, "range": [ 434, 478 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } } } ], "kind": "var", "range": [ 430, 479 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 57 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 492, 500 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "---------x---------------y-----|", "raw": "'---------x---------------y-----|'", "range": [ 503, 537 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 57 } } }, "range": [ 492, 537 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 57 } } } ], "kind": "var", "range": [ 488, 538 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 58 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 551, 557 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 574, 575 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 578, 581 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 19 } } }, { "type": "Literal", "value": "b", "raw": "'b'", "range": [ 583, 586 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 24 } } } ], "range": [ 577, 587 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 25 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 574, 587 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 25 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 601, 602 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "f", "raw": "'f'", "range": [ 605, 608 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 19 } } } ], "range": [ 604, 609 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 20 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 601, 609 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 20 } } } ], "range": [ 560, 620 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 15, "column": 9 } } }, "range": [ 551, 620 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 15, "column": 9 } } } ], "kind": "var", "range": [ 547, 621 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 15, "column": 10 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 634, 640 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 643, 645 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 23 } } }, "property": { "type": "Identifier", "name": "bufferToggle", "range": [ 646, 658 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 36 } } }, "range": [ 643, 658 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 36 } } }, "arguments": [ { "type": "Identifier", "name": "e2", "range": [ 659, 661 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 39 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 673, 674 ], "loc": { "start": { "line": 16, "column": 51 }, "end": { "line": 16, "column": 52 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": {