@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 Min 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 smallest number.\n *\n * <img src=\"./img/min.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two items.\n * @return {Observable<R>} an Observable that emits item with the smallest number.\n * @method min\n * @owner Observable\n ",
"range": [
43,
549
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
]
},
{
"type": "ExportNamedDeclaration",
"declaration": {
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "min",
"range": [
566,
569
],
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 19
}
}
},
"params": [
{
"type": "Identifier",
"name": "comparer",
"range": [
570,
578
],
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 28
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "min",
"range": [
590,
593
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
},
"init": {
"type": "ConditionalExpression",
"test": {
"type": "BinaryExpression",
"operator": "===",
"left": {
"type": "UnaryExpression",
"operator": "typeof",
"argument": {
"type": "Identifier",
"name": "comparer",
"range": [
604,
612
],
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 30
}
}
},
"prefix": true,
"range": [
597,
612
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 30
}
}
},
"right": {
"type": "Literal",
"value": "function",
"raw": "'function'",
"range": [
617,
627
],
"loc": {
"start": {
"line": 14,
"column": 35
},
"end": {
"line": 14,
"column": 45
}
}
},
"range": [
597,
627
],
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 45
}
}
},
"consequent": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
649,
650
],
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 21
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
652,
653
],
"loc": {
"start": {
"line": 15,
"column": 23
},
"end": {
"line": 15,
"column": 24
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "ConditionalExpression",
"test": {
"type": "BinaryExpression",
"operator": "<",
"left": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "comparer",
"range": [
664,
672
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 43
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "x",
"range": [
673,
674
],
"loc": {
"start": {
"line": 15,
"column": 44
},
"end": {
"line": 15,
"column": 45
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
676,
677
],
"loc": {
"start": {
"line": 15,
"column": 47
},
"end": {
"line": 15,
"column": 48
}
}
}
],
"range": [
664,
678
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 49
}
}
},
"right": {
"type": "Literal",
"value": 0,
"raw": "0",
"range": [
681,
682
],
"loc": {
"start": {
"line": 15,
"column": 52
},
"end": {
"line": 15,
"column": 53
}
}
},
"range": [
664,
682
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 53
}
}
},
"consequent": {
"type": "Identifier",
"name": "x",
"range": [
685,
686
],
"loc": {
"start": {
"line": 15,
"column": 56
},
"end": {
"line": 15,
"column": 57
}
}
},
"alternate": {
"type": "Identifier",
"name": "y",
"range": [
689,
690
],
"loc": {
"start": {
"line": 15,
"column": 60
},
"end": {
"line": 15,
"column": 61
}
}
},
"range": [
664,
690
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 61
}
}
},
"range": [
657,
691
],
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 62
}
}
}
],
"range": [
655,
693
],
"loc": {
"start": {
"line": 15,
"column": 26
},
"end": {
"line": 15,
"column": 64
}
}
},
"generator": false,
"expression": false,
"range": [
639,
693
],
"loc": {
"start": {
"line": 15,
"column": 10
},
"end": {
"line": 15,
"column": 64
}
}
},
"alternate": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "x",
"range": [
714,
715
],
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 21
}
}
},
{
"type": "Identifier",
"name": "y",
"range": [
717,
718
],
"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": "Identifier",
"name": "x",
"range": [
729,
730
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 36
}
}
},
"right": {
"type": "Identifier",
"name": "y",
"range": [
733,
734
],
"loc": {
"start": {
"line": 16,
"column": 39
},
"end": {
"line": 16,
"column": 40
}
}
},
"range": [
729,
734
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 40
}
}
},
"consequent": {
"type": "Identifier",
"name": "x",
"range": [
737,
738
],
"loc": {
"start": {
"line": 16,
"column": 43
},
"end": {
"line": 16,
"column": 44
}
}
},
"alternate": {
"type": "Identifier",
"name": "y",
"range": [
741,
742
],
"loc": {
"start": {
"line": 16,
"column": 47
},
"end": {
"line": 16,
"column": 48
}
}
},
"range": [
729,
742
],
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 48
}
}
},
"range": [
722,
743
],
"loc": {
"start": {
"line": 16,
"column": 28
},
"end": {
"line": 16,
"column": 49
}
}
}
],
"range": [
720,
745
],
"loc": {
"start": {
"line": 16,
"column": 26
},
"end": {
"line": 16,
"column": 51
}
}
},
"generator": false,
"expression": false,
"range": [
704,
745
],
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 51
}
}
},
"range": [
596,
745
],
"loc": {
"start": {
"line": 14,
"column": 14
},
"end": {
"line": 16,
"column": 51
}
}
},
"range": [
590,
745
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 16,
"column": 51
}
}
}
],
"kind": "var",
"range": [
586,
746
],
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 16,
"column": 52
}
}
},
{
"type": "ReturnStatement",
"argument": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "ThisExpression",
"range": [
758,
762
],
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"name": "lift",
"range": [
763,
767
],
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 20
}
}
},
"range": [
758,
767
],
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 20
}
}
},
"arguments": [
{
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "ReduceOperator",
"range": [
772,
786
],
"loc": {
"start": {
"line": 17,
"column": 25
},
"end": {
"line": 17,
"column": 39
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "min",
"range": [
787,
790
],
"loc": {
"start": {
"line": 17,
"column": 40
},
"end": {
"line": 17,
"column": 43
}
}
}
],
"range": [
768,
791
],
"loc": {
"start": {
"line": 17,
"column": 21
},
"end": {
"line": 17,
"column": 44
}
}
}
],
"range": [
758,
792
],
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 45
}
}
},
"range": [
751,
793
],
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 46
}
}
}
],
"range": [
580,
795
],
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 18,
"column": 1
}
}
},
"generator": false,
"expression": false,
"range": [
557,
795
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 18,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * The Min 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 smallest number.\n *\n * <img src=\"./img/min.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two items.\n * @return {Observable<R>} an Observable that emits item with the smallest number.\n * @method min\n * @owner Observable\n ",
"range": [
43,
549
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "Line",
"value": "# sourceMappingURL=min.js.map",
"range": [
796,
827
],
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 19,
"column": 31
}
}
}
]
},
"specifiers": [],
"source": null,
"range": [
550,
795
],
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * The Min 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 smallest number.\n *\n * <img src=\"./img/min.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two items.\n * @return {Observable<R>} an Observable that emits item with the smallest number.\n * @method min\n * @owner Observable\n ",
"range": [
43,
549
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
}
],
"trailingComments": [
{
"type": "Line",
"value": "# sourceMappingURL=min.js.map",
"range": [
796,
827
],
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 19,
"column": 31
}
}
}
]
}
],
"sourceType": "module",
"range": [
0,
795
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 18,
"column": 1
}
},
"comments": [
{
"type": "Block",
"value": "*\n * The Min 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 smallest number.\n *\n * <img src=\"./img/min.png\" width=\"100%\">\n *\n * @param {Function} optional comparer function that it will use instead of its default to compare the value of two items.\n * @return {Observable<R>} an Observable that emits item with the smallest number.\n * @method min\n * @owner Observable\n ",
"range": [
43,
549
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
}
},
{
"type": "Line",
"value": "# sourceMappingURL=min.js.map",
"range": [
796,
827
],
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 19,
"column": 31
}
}
}
]
}