UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,323 lines (1,322 loc) 1.24 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 {repeatWhen} ", "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.repeatWhen", "raw": "'Observable.prototype.repeatWhen'", "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": "repeatWhen", "raw": "'repeatWhen'", "range": [ 213, 225 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 26 } } } ], "range": [ 203, 226 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 27 } } }, "arguments": [ { "type": "Literal", "value": "should handle a source with eventual complete using a hot notifier", "raw": "'should handle a source with eventual complete using a hot notifier'", "range": [ 227, 295 ], "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 96 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 323, 329 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 332, 336 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": "-1--2--|", "raw": "'-1--2--|'", "range": [ 337, 347 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 36 } } } ], "range": [ 332, 348 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 37 } } }, "range": [ 323, 348 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 37 } } } ], "kind": "var", "range": [ 319, 349 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subs", "range": [ 362, 366 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 16 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 370, 401 ], "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 51 } } }, { "type": "Literal", "value": " ^ ! ", "raw": "' ^ ! '", "range": [ 415, 446 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 43 } } }, { "type": "Literal", "value": " ^ !", "raw": "' ^ !'", "range": [ 460, 491 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 43 } } } ], "range": [ 369, 492 ], "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 11, "column": 44 } } }, "range": [ 362, 492 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 11, "column": 44 } } } ], "kind": "var", "range": [ 358, 493 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 11, "column": 45 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "notifier", "range": [ 506, 514 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 517, 520 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 26 } } }, "arguments": [ { "type": "Literal", "value": "-------------r------------r-|", "raw": "'-------------r------------r-|'", "range": [ 521, 552 ], "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 58 } } } ], "range": [ 517, 553 ], "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 59 } } }, "range": [ 506, 553 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 59 } } } ], "kind": "var", "range": [ 502, 554 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 60 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 567, 575 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 20 } } }, "init": { "type": "Literal", "value": "-1--2---------1--2---------1|", "raw": "'-1--2---------1--2---------1|'", "range": [ 578, 609 ], "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 54 } } }, "range": [ 567, 609 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 54 } } } ], "kind": "var", "range": [ 563, 610 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 55 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 623, 629 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 632, 638 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 27 } } }, "property": { "type": "Identifier", "name": "repeatWhen", "range": [ 639, 649 ], "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 38 } } }, "range": [ 632, 649 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 38 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "notifications", "range": [ 660, 673 ], "loc": { "start": { "line": 14, "column": 49 }, "end": { "line": 14, "column": 62 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "notifier", "range": [ 684, 692 ], "loc": { "start": { "line": 14, "column": 73 }, "end": { "line": 14, "column": 81 } } }, "range": [ 677, 693 ], "loc": { "start": { "line": 14, "column": 66 }, "end": { "line": 14, "column": 82 } } } ], "range": [ 675, 695 ], "loc": { "start": { "line": 14, "column": 64 }, "end": { "line": 14, "column": 84 } } }, "generator": false, "expression": false, "range": [ 650, 695 ], "loc": { "start": { "line": 14, "column": 39 }, "end": { "line": 14, "column": 84 } } } ], "range": [ 632, 696 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 85 } } }, "range": [ 623, 696 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 85 } } } ], "kind": "var", "range": [ 619, 697 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 86 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 706, 722 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 723, 729 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 31 } } } ], "range": [ 706, 730 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 731, 735 ], "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 37 } } }, "range": [ 706, 735 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 37 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 736, 744 ], "loc": { "start": { "line": 15, "column": 38 }, "end": { "line": 15, "column": 46 } } } ], "range": [ 706, 745 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 47 } } }, "range": [ 706, 746 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 48 } } }, { "type": "ExpressionStatement",