UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,270 lines (1,269 loc) 678 kB
{ "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": "Rx", "range": [ 18, 20 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 23, 30 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 31, 50 ], "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 36 } } } ], "range": [ 23, 51 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 37 } } }, "range": [ 18, 51 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 37 } } } ], "kind": "var", "range": [ 14, 52 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 57, 67 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 70, 72 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 73, 83 ], "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 30 } } }, "range": [ 70, 83 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 30 } } }, "range": [ 57, 83 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 30 } } } ], "kind": "var", "range": [ 53, 84 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {windowCount} ", "range": [ 85, 111 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 26 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 112, 120 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.windowCount", "raw": "'Observable.prototype.windowCount'", "range": [ 121, 155 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 43 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 175, 184 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "windowCount(3)", "raw": "'windowCount(3)'", "range": [ 185, 201 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 30 } } } ], "range": [ 175, 202 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 31 } } }, "arguments": [ { "type": "Literal", "value": "should emit windows with count 3, no skip specified", "raw": "'should emit windows with count 3, no skip specified'", "range": [ 203, 256 ], "loc": { "start": { "line": 6, "column": 32 }, "end": { "line": 6, "column": 85 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 284, 290 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 293, 296 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "---a---b---c---d---e---f---g---h---i---|", "raw": "'---a---b---c---d---e---f---g---h---i---|'", "range": [ 297, 339 ], "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 67 } } } ], "range": [ 293, 340 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 68 } } }, "range": [ 284, 340 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 68 } } } ], "kind": "var", "range": [ 280, 341 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 69 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sourceSubs", "range": [ 354, 364 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 22 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 367, 409 ], "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 8, "column": 67 } } }, "range": [ 354, 409 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 67 } } } ], "kind": "var", "range": [ 350, 410 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 68 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 423, 431 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, "init": { "type": "Literal", "value": "x----------y-----------z-----------w---|", "raw": "'x----------y-----------z-----------w---|'", "range": [ 434, 476 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 65 } } }, "range": [ 423, 476 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 65 } } } ], "kind": "var", "range": [ 419, 477 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 66 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 490, 491 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 494, 498 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---a---b---(c|) ", "raw": "'---a---b---(c|) '", "range": [ 499, 541 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 63 } } } ], "range": [ 494, 542 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 64 } } }, "range": [ 490, 542 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 64 } } } ], "kind": "var", "range": [ 486, 543 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 65 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 556, 557 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 560, 564 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----d---e---(f|) ", "raw": "'----d---e---(f|) '", "range": [ 565, 596 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 52 } } } ], "range": [ 560, 597 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 53 } } }, "range": [ 556, 597 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 53 } } } ], "kind": "var", "range": [ 552, 598 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 54 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "z", "range": [ 611, 612 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 615, 619 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----g---h---(i|) ", "raw": "'----g---h---(i|) '", "range": [ 620, 639 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 40 } } } ], "range": [ 615, 640 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 41 } } }, "range": [ 611, 640 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 41 } } } ], "kind": "var", "range": [ 607, 641 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "w", "range": [ 654, 655 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 658, 662 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----|", "raw": "'----|'", "range": [ 663, 670 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 28 } } } ], "range": [ 658, 671 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 29 } } }, "range": [ 654, 671 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 29 } } } ], "kind": "var", "range": [ 650, 672 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 30 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expectedValues", "range": [ 685, 699 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 26 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 704, 705 ], "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 32 } } }, "value": { "type": "Identifier", "name": "x", "range": [ 707, 708 ], "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 35 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 704, 708 ], "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 35 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 710, 711 ], "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 38 } } }, "value": { "type": "Identifier", "name": "y", "range": [ 713, 714 ], "loc": { "start": { "line": 14, "column": 40 }, "end": { "line": 14, "column": 41 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 710, 714 ], "loc": { "start": { "line": 14, "column": 37 }, "end": { "line": 14, "column": 41 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "z", "range": [ 716, 717 ], "loc": { "start": {