@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,092 lines • 35.8 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "ReduceOperator",
"range": [
9,
23
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
}
},
"imported": {
"type": "Identifier",
"name": "ReduceOperator",
"range": [
9,
23
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
}
},
"range": [
9,
23
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 23
}
}
}
],
"source": {
"type": "Literal",
"value": "./reduce",
"raw": "'./reduce'",
"range": [
31,
41
],
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 41
}
}
},
"range": [
0,
42
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers),\n * and when source Observable completes it emits a single item: the item with the largest number.\n *\n * <img src=\"./img/max.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two\n * items.\n * @return {Observable} an Observable that emits item with the largest number.\n * @method max\n * @owner Observable\n ",
"range": [
43,
547
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 13,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "max",
"range": [
564,
567
],
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 19
}
}
},
"params": [
{
"type": "Identifier",
"name": "comparer",
"range": [
568,
576
],
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 28
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "max",
"range": [
588,
591
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 11
}
}
},
"init": {
"type": "ConditionalExpression",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "UnaryExpression",
"operator": "typeof",
"argument": {
"type": "Identifier",
"name": "comparer",
"range": [
602,
610
],
"loc": {
"start": {
"line": 15,
"column": 22
},
"end": {
"line": 15,
"column": 30
}
}
},
"prefix": true,
"range": [
595,
610
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 30
}
}
},
"right": {
"type": "Literal",
"value": "function",
"raw": "'function'",
"range": [
615,
625
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 45
}
}
},
"range": [
595,
625
],
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 45
}
}
},
"consequent": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
647,
648
],
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 21
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
650,
651
],
"loc": {
"start": {
"line": 16,
"column": 23
},
"end": {
"line": 16,
"column": 24
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "ConditionalExpression",
"test": {
"type": "BinaryExpression",
"operator": ">",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "comparer",
"range": [
662,
670
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 43
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "x",
"range": [
671,
672
],
"loc": {
"start": {
"line": 16,
"column": 44
},
"end": {
"line": 16,
"column": 45
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
674,
675
],
"loc": {
"start": {
"line": 16,
"column": 47
},
"end": {
"line": 16,
"column": 48
}
}
}
],
"range": [
662,
676
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 49
}
}
},
"right": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
679,
680
],
"loc": {
"start": {
"line": 16,
"column": 52
},
"end": {
"line": 16,
"column": 53
}
}
},
"range": [
662,
680
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 53
}
}
},
"consequent": {
"type": "Identifier",
"name": "x",
"range": [
683,
684
],
"loc": {
"start": {
"line": 16,
"column": 56
},
"end": {
"line": 16,
"column": 57
}
}
},
"alternate": {
"type": "Identifier",
"name": "y",
"range": [
687,
688
],
"loc": {
"start": {
"line": 16,
"column": 60
},
"end": {
"line": 16,
"column": 61
}
}
},
"range": [
662,
688
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 61
}
}
},
"range": [
655,
689
],
"loc": {
"start": {
"line": 16,
"column": 28
},
"end": {
"line": 16,
"column": 62
}
}
}
],
"range": [
653,
691
],
"loc": {
"start": {
"line": 16,
"column": 26
},
"end": {
"line": 16,
"column": 64
}
}
},
"generator": false,
"expression": false,
"range": [
637,
691
],
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 64
}
}
},
"alternate": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
712,
713
],
"loc": {
"start": {
"line": 17,
"column": 20
},
"end": {
"line": 17,
"column": 21
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
715,
716
],
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 24
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "ConditionalExpression",
"test": {
"type": "BinaryExpression",
"operator": ">",
"left": {
"type": "Identifier",
"name": "x",
"range": [
727,
728
],
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 36
}
}
},
"right": {
"type": "Identifier",
"name": "y",
"range": [
731,
732
],
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 40
}
}
},
"range": [
727,
732
],
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 40
}
}
},
"consequent": {
"type": "Identifier",
"name": "x",
"range": [
735,
736
],
"loc": {
"start": {
"line": 17,
"column": 43
},
"end": {
"line": 17,
"column": 44
}
}
},
"alternate": {
"type": "Identifier",
"name": "y",
"range": [
739,
740
],
"loc": {
"start": {
"line": 17,
"column": 47
},
"end": {
"line": 17,
"column": 48
}
}
},
"range": [
727,
740
],
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 48
}
}
},
"range": [
720,
741
],
"loc": {
"start": {
"line": 17,
"column": 28
},
"end": {
"line": 17,
"column": 49
}
}
}
],
"range": [
718,
743
],
"loc": {
"start": {
"line": 17,
"column": 26
},
"end": {
"line": 17,
"column": 51
}
}
},
"generator": false,
"expression": false,
"range": [
702,
743
],
"loc": {
"start": {
"line": 17,
"column": 10
},
"end": {
"line": 17,
"column": 51
}
}
},
"range": [
594,
743
],
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 17,
"column": 51
}
}
},
"range": [
588,
743
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 17,
"column": 51
}
}
}
],
"kind": "var",
"range": [
584,
744
],
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 17,
"column": 52
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
756,
760
],
"loc": {
"start": {
"line": 18,
"column": 11
},
"end": {
"line": 18,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
761,
765
],
"loc": {
"start": {
"line": 18,
"column": 16
},
"end": {
"line": 18,
"column": 20
}
}
},
"range": [
756,
765
],
"loc": {
"start": {
"line": 18,
"column": 11
},
"end": {
"line": 18,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ReduceOperator",
"range": [
770,
784
],
"loc": {
"start": {
"line": 18,
"column": 25
},
"end": {
"line": 18,
"column": 39
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "max",
"range": [
785,
788
],
"loc": {
"start": {
"line": 18,
"column": 40
},
"end": {
"line": 18,
"column": 43
}
}
}
],
"range": [
766,
789
],
"loc": {
"start": {
"line": 18,
"column": 21
},
"end": {
"line": 18,
"column": 44
}
}
}
],
"range": [
756,
790
],
"loc": {
"start": {
"line": 18,
"column": 11
},
"end": {
"line": 18,
"column": 45
}
}
},
"range": [
749,
791
],
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 46
}
}
}
],
"range": [
578,
793
],
"loc": {
"start": {
"line": 14,
"column": 30
},
"end": {
"line": 19,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
555,
793
],
"loc": {
"start": {
"line": 14,
"column": 7
},
"end": {
"line": 19,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers),\n * and when source Observable completes it emits a single item: the item with the largest number.\n *\n * <img src=\"./img/max.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two\n * items.\n * @return {Observable} an Observable that emits item with the largest number.\n * @method max\n * @owner Observable\n ",
"range": [
43,
547
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 13,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "Line",
"value": "# sourceMappingURL=max.js.map",
"range": [
794,
825
],
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 20,
"column": 31
}
}
}
]
},
"specifiers": [],
"source": null,
"range": [
548,
793
],
"loc": {
"start": {
"line": 14,
"column": 0
},
"end": {
"line": 19,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers),\n * and when source Observable completes it emits a single item: the item with the largest number.\n *\n * <img src=\"./img/max.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two\n * items.\n * @return {Observable} an Observable that emits item with the largest number.\n * @method max\n * @owner Observable\n ",
"range": [
43,
547
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 13,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "Line",
"value": "# sourceMappingURL=max.js.map",
"range": [
794,
825
],
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 20,
"column": 31
}
}
}
]
}
],
"sourceType": "module",
"range": [
0,
793
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 19,
"column": 1
}
},
"comments": [
{
"type": "Block",
"value": "*\n * The Max operator operates on an Observable that emits numbers (or items that can be evaluated as numbers),\n * and when source Observable completes it emits a single item: the item with the largest number.\n *\n * <img src=\"./img/max.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two\n * items.\n * @return {Observable} an Observable that emits item with the largest number.\n * @method max\n * @owner Observable\n ",
"range": [
43,
547
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 13,
"column": 3
}
}
},
{
"type": "Line",
"value": "# sourceMappingURL=max.js.map",
"range": [
794,
825
],
"loc": {
"start": {
"line": 20,
"column": 0
},
"end": {
"line": 20,
"column": 31
}
}
}
]
}