UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,499 lines (1,498 loc) 88.5 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportSpecifier", "local": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "imported": { "type": "Identifier", "name": "Subscriber", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } } ], "source": { "type": "Literal", "value": "../Subscriber", "raw": "'../Subscriber'", "range": [ 27, 42 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } }, "trailingComments": [ { "type": "Block", "value": "*\n * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.\n *\n * <img src=\"./img/isEmpty.png\" width=\"100%\">\n *\n * @return {Observable} an Observable that emits a Boolean.\n * @method isEmpty\n * @owner Observable\n ", "range": [ 44, 308 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 10, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "isEmpty", "range": [ 325, 332 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 348, 352 ], "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 12, "column": 15 } } }, "property": { "type": "Identifier", "name": "lift", "range": [ 353, 357 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 20 } } }, "range": [ 348, 357 ], "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 12, "column": 20 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "IsEmptyOperator", "range": [ 362, 377 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 40 } } }, "arguments": [], "range": [ 358, 379 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 42 } } } ], "range": [ 348, 380 ], "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 12, "column": 43 } } }, "range": [ 341, 381 ], "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 44 } } } ], "range": [ 335, 383 ], "loc": { "start": { "line": 11, "column": 26 }, "end": { "line": 13, "column": 1 } } }, "generator": false, "expression": false, "range": [ 316, 383 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 13, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.\n *\n * <img src=\"./img/isEmpty.png\" width=\"100%\">\n *\n * @return {Observable} an Observable that emits a Boolean.\n * @method isEmpty\n * @owner Observable\n ", "range": [ 44, 308 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 10, "column": 3 } } } ], "trailingComments": [] }, "specifiers": [], "source": null, "range": [ 309, 383 ], "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 13, "column": 1 } }, "leadingComments": [ { "type": "Block", "value": "*\n * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false.\n *\n * <img src=\"./img/isEmpty.png\" width=\"100%\">\n *\n * @return {Observable} an Observable that emits a Boolean.\n * @method isEmpty\n * @owner Observable\n ", "range": [ 44, 308 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 10, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "IsEmptyOperator", "range": [ 388, 403 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 19 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "IsEmptyOperator", "range": [ 434, 449 ], "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 28 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 452, 459 ], "loc": { "start": { "line": 15, "column": 31 }, "end": { "line": 16, "column": 5 } } }, "generator": false, "expression": false, "range": [ 425, 459 ], "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 16, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IsEmptyOperator", "range": [ 464, 479 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 19 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 480, 489 ], "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 29 } } }, "range": [ 464, 489 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 29 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 490, 494 ], "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 17, "column": 34 } } }, "range": [ 464, 494 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 34 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "observer", "range": [ 507, 515 ], "loc": { "start": { "line": 17, "column": 47 }, "end": { "line": 17, "column": 55 } } }, { "type": "Identifier", "name": "source", "range": [ 517, 523 ], "loc": { "start": { "line": 17, "column": 57 }, "end": { "line": 17, "column": 63 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 542, 548 ], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 21 } } }, "property": { "type": "Identifier", "name": "_subscribe", "range": [ 549, 559 ], "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 32 } } }, "range": [ 542, 559 ], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 32 } } }, "arguments": [ { "type": "NewExpression", "callee": { "type": "Identifier", "name": "IsEmptySubscriber", "range": [ 564, 581 ], "loc": { "start": { "line": 18, "column": 37 }, "end": { "line": 18, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "observer", "range": [ 582, 590 ], "loc": { "start": { "line": 18, "column": 55 }, "end": { "line": 18, "column": 63 } } } ], "range": [ 560, 591 ], "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 64 } } } ], "range": [ 542, 592 ], "loc": { "start": { "line": 18, "column": 15 }, "end": { "line": 18, "column": 65 } } }, "range": [ 535, 593 ], "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 66 } } } ], "range": [ 525, 599 ], "loc": { "start": { "line": 17, "column": 65 }, "end": { "line": 19, "column": 5 } } }, "generator": false, "expression": false, "range": [ 497, 599 ], "loc": { "start": { "line": 17, "column": 37 }, "end": { "line": 19, "column": 5 } } }, "range": [ 464, 599 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 5 } } }, "range": [ 464, 600 ], "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 19, "column": 6 } } }, { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "IsEmptyOperator", "range": [ 612, 627 ], "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 26 } } }, "range": [ 605, 628 ], "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 27 } } } ], "range": [ 419, 630 ], "loc": { "start": { "line": 14, "column": 35 }, "end": { "line": 21, "column": 1 } } }, "generator": false, "expression": false, "range": [ 407, 630 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 21, "column": 1 } } }, "arguments": [], "range": [ 407, 632 ], "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 21, "column": 3 } } }, "range": [ 388, 633 ], "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 21, "column": 4 } } } ], "kind": "var", "range": [ 384, 634 ], "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 21, "column": 5 } }, "trailingComments": [ { "type": "Block", "value": "*\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n ", "range": [ 635, 726 ], "loc": { "start": { "line": 22, "column": 0 }, "end": { "line": 26, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "IsEmptySubscriber", "range": [ 731, 748 ], "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "_super", "range": [ 762, 768 ], "loc": { "start": { "line": 27, "column": 35 }, "end": { "line": 27, "column": 41 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "__extends", "range": [ 776, 785 ], "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "IsEmptySubscriber", "range": [ 786, 803 ], "loc": { "start": { "line": 28, "column": 14 }, "end": { "line": 28, "column": 31 } } }, { "type": "Identifier", "name": "_super", "range": [ 805, 811 ], "loc": { "start": { "line": 28, "column": 33 }, "end": { "line": 28, "column": 39 } } } ], "range": [ 776, 812 ], "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 40 } } }, "range": [ 776, 813 ], "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 41 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "IsEmptySubscriber", "range": [ 827, 844 ], "loc": { "start": { "line": 29, "column": 13 }, "end": { "line": 29, "column": 30 } } }, "params": [ { "type": "Identifier", "name": "destination", "range": [ 845, 856 ], "loc": { "start": { "line": 29, "column": 31 }, "end": { "line": 29, "column": 42 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "_super", "range": [ 868, 874 ], "loc": { "start": { "line": 30, "column": 8 }, "end": { "line": 30, "column": 14 } } }, "property": { "type": "Identifier", "name": "call", "range": [ 875, 879 ], "loc": { "start": { "line": 30, "column": 15 }, "end": { "line": 30, "column": 19 } } }, "range": [ 868, 879 ], "loc": { "start": { "line": 30, "column": 8 }, "end": { "line": 30, "column": 19 } } }, "arguments": [ { "type": "ThisExpression", "range": [ 880, 884 ], "loc": { "start": { "line": 30, "column": 20 }, "end": { "line": 30, "column": 24 } } }, { "type": "Identifier", "name": "destination", "range": [ 886, 897 ], "loc": { "start": { "line": 30, "column": 26 }, "end": { "line": 30, "column": 37 } } } ], "range": [ 868, 898 ], "loc": { "start": { "line": 30, "column": 8 }, "end": { "line": 30, "column": 38 } } }, "range": [ 868, 899 ], "loc": { "start": { "line": 30, "column": 8 }, "end": { "line": 30, "column": 39 } } } ], "range": [ 858, 905 ], "loc": { "start": { "line": 29, "column": 44 }, "end": { "line": 31, "column": 5 } } }, "generator": false, "expression": false, "range": [ 818, 905 ], "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 31, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "IsEmptySubscriber", "range": [ 910, 927 ], "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 21 } } }, "property": { "type": "Identifier", "name": "prototype", "range": [ 928, 937 ], "loc": { "start": { "line": 32, "column": 22 }, "end": { "line": 32, "column": 31 } } }, "range": [ 910, 937 ], "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 31 } } }, "property": { "type": "Identifier", "name": "notifyComplete", "range": [ 938, 952 ], "loc": { "start": { "line": 32, "column": 32 }, "end": { "line": 32, "column": 46 } } }, "range": [ 910, 952 ], "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 46 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "isEmpty", "range": [ 965, 972 ], "loc": { "start": { "line": 32, "column": 59 }, "end": { "line": 32, "column": 66 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "destination", "range": [ 988, 999 ], "loc": { "start": { "line": 33, "column": 12 }, "end": { "line": 33, "column": 23 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1002, 1006 ], "loc": { "start": { "line": 33, "column": 26 }, "end": { "line": 33, "column": 30 } } }, "property": { "type": "Identifier", "name": "destination", "range": [ 1007, 1018 ], "loc": { "start": { "line": 33, "column": 31 }, "end": { "line": 33, "column": 42 } } }, "range": [ 1002, 1018 ], "loc": { "start": { "line": 33, "column": 26 }, "end": { "line": 33, "column": 42 } } }, "range": [ 988, 1018 ], "loc": { "start": { "line": 33, "column": 12 }, "end": { "line": 33, "column": 42 } } } ], "kind": "var", "range": [ 984, 1019 ], "loc": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 43 } } },