UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,220 lines (1,219 loc) 946 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 {buffer} ", "range": [ 85, 106 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 21 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 107, 115 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.buffer", "raw": "'Observable.prototype.buffer'", "range": [ 116, 145 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 38 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 165, 174 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "buffer", "raw": "'buffer'", "range": [ 175, 183 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 22 } } } ], "range": [ 165, 184 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 23 } } }, "arguments": [ { "type": "Literal", "value": "should emit buffers that close and reopen", "raw": "'should emit buffers that close and reopen'", "range": [ 185, 228 ], "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 67 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "range": [ 256, 257 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 260, 263 ], "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 19 } } }, "arguments": [ { "type": "Literal", "value": "-a-b-c-d-e-f-g-h-i-|", "raw": "'-a-b-c-d-e-f-g-h-i-|'", "range": [ 264, 286 ], "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 42 } } } ], "range": [ 260, 287 ], "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 43 } } }, "range": [ 256, 287 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 43 } } } ], "kind": "var", "range": [ 252, 288 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "range": [ 301, 302 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 13 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 305, 308 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 19 } } }, "arguments": [ { "type": "Literal", "value": "-----B-----B-----B-|", "raw": "'-----B-----B-----B-|'", "range": [ 309, 331 ], "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 42 } } } ], "range": [ 305, 332 ], "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 43 } } }, "range": [ 301, 332 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 43 } } } ], "kind": "var", "range": [ 297, 333 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 346, 354 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, "init": { "type": "Literal", "value": "-----x-----y-----z-|", "raw": "'-----x-----y-----z-|'", "range": [ 357, 379 ], "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 9, "column": 45 } } }, "range": [ 346, 379 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 45 } } } ], "kind": "var", "range": [ 342, 380 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expectedValues", "range": [ 393, 407 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 26 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 424, 425 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 428, 431 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 19 } } }, { "type": "Literal", "value": "b", "raw": "'b'", "range": [ 433, 436 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 24 } } }, { "type": "Literal", "value": "c", "raw": "'c'", "range": [ 438, 441 ], "loc": { "start": { "line": 11, "column": 26 }, "end": { "line": 11, "column": 29 } } } ], "range": [ 427, 442 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 30 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 424, 442 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 30 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 456, 457 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "d", "raw": "'d'", "range": [ 460, 463 ], "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 19 } } }, { "type": "Literal", "value": "e", "raw": "'e'", "range": [ 465, 468 ], "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 24 } } }, { "type": "Literal", "value": "f", "raw": "'f'", "range": [ 470, 473 ], "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 29 } } } ], "range": [ 459, 474 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 30 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 456, 474 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 30 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "z", "range": [ 488, 489 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "g", "raw": "'g'", "range": [ 492, 495 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 19 } } }, { "type": "Literal", "value": "h", "raw": "'h'", "range": [ 497, 500 ], "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 24 } } }, { "type": "Literal", "value": "i", "raw": "'i'", "range": [ 502, 505 ], "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 29 } } } ], "range": [ 491, 506 ], "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 30 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 488, 506 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 30 } } } ], "range": [ 410, 516 ], "loc": { "start": { "line": 10, "column": 29 }, "end": { "line": 14, "column": 9 } } }, "range": [ 393, 516 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 14, "column": 9 } } } ], "kind": "var", "range": [ 389, 517 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 14, "column": 10 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 526, 542 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 24 } } }, "arguments": [ { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "a", "range": [ 543, 544 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 26 } } }, "property": { "type": "Identifier", "name": "buffer", "range": [ 545, 551 ], "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 33 } } }, "range": [ 543, 551 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "b", "range": [