UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,235 lines (1,234 loc) 1.22 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": "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 {bufferTime} ", "range": [ 85, 110 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 25 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 111, 119 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.bufferTime", "raw": "'Observable.prototype.bufferTime'", "range": [ 120, 153 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "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": [ 173, 182 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "bufferTime(100)", "raw": "'bufferTime(100)'", "range": [ 183, 200 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 31 } } } ], "range": [ 173, 201 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 32 } } }, "arguments": [ { "type": "Literal", "value": "should emit buffers at intervals", "raw": "'should emit buffers at intervals'", "range": [ 202, 236 ], "loc": { "start": { "line": 6, "column": 33 }, "end": { "line": 6, "column": 67 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 264, 266 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 269, 272 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "---a---b---c---d---e---f---g-----|", "raw": "'---a---b---c---d---e---f---g-----|'", "range": [ 273, 309 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 57 } } } ], "range": [ 269, 310 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 58 } } }, "range": [ 264, 310 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 58 } } } ], "kind": "var", "range": [ 260, 311 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 59 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "subs", "range": [ 324, 328 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 16 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 331, 367 ], "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 55 } } }, "range": [ 324, 367 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 55 } } } ], "kind": "var", "range": [ 320, 368 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 56 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "t", "range": [ 381, 382 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "time", "range": [ 385, 389 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "----------|", "raw": "'----------|'", "range": [ 390, 403 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 34 } } } ], "range": [ 385, 404 ], "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 35 } } }, "range": [ 381, 404 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 35 } } } ], "kind": "var", "range": [ 377, 405 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 36 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 418, 426 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } } }, "init": { "type": "Literal", "value": "----------w---------x---------y--(z|)", "raw": "'----------w---------x---------y--(z|)'", "range": [ 429, 468 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 62 } } }, "range": [ 418, 468 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 62 } } } ], "kind": "var", "range": [ 414, 469 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 63 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 482, 488 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "w", "range": [ 505, 506 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 509, 512 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 19 } } }, { "type": "Literal", "value": "b", "raw": "'b'", "range": [ 514, 517 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 24 } } } ], "range": [ 508, 518 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 25 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 505, 518 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 25 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 532, 533 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "c", "raw": "'c'", "range": [ 536, 539 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 19 } } }, { "type": "Literal", "value": "d", "raw": "'d'", "range": [ 541, 544 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 24 } } }, { "type": "Literal", "value": "e", "raw": "'e'", "range": [ 546, 549 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 29 } } } ], "range": [ 535, 550 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 30 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 532, 550 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 30 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 564, 565 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "f", "raw": "'f'", "range": [ 568, 571 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 19 } } }, { "type": "Literal", "value": "g", "raw": "'g'", "range": [ 573, 576 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 24 } } } ], "range": [ 567, 577 ], "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 25 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 564, 577 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 25 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "z", "range": [ 591, 592 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [], "range": [ 594, 596 ], "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 15, "column": 17 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 591, 596 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 17 } } } ], "range": [ 491, 606 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 16, "column": 9 } } }, "range": [ 482, 606 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 16, "column": 9 } } } ], "kind": "var", "range": [ 478, 607 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 16, "column": 10 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 620, 626