UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,280 lines (1,279 loc) 159 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": "chai_1", "range": [ 18, 24 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 10 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 27, 34 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "chai", "raw": "'chai'", "range": [ 35, 41 ], "loc": { "start": { "line": 2, "column": 21 }, "end": { "line": 2, "column": 27 } } } ], "range": [ 27, 42 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 28 } } }, "range": [ 18, 42 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 28 } } } ], "kind": "var", "range": [ 14, 43 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 29 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Rx", "range": [ 48, 50 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 53, 60 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 61, 80 ], "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 36 } } } ], "range": [ 53, 81 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 37 } } }, "range": [ 48, 81 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 37 } } } ], "kind": "var", "range": [ 44, 82 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 87, 97 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 100, 102 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 103, 113 ], "loc": { "start": { "line": 4, "column": 20 }, "end": { "line": 4, "column": 30 } } }, "range": [ 100, 113 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 30 } } }, "range": [ 87, 113 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 30 } } } ], "kind": "var", "range": [ 83, 114 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 31 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 115, 123 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.pairs", "raw": "'Observable.pairs'", "range": [ 124, 142 ], "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 27 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 162, 171 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "pairs({a: 1, b:2})", "raw": "'pairs({a: 1, b:2})'", "range": [ 172, 192 ], "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 34 } } } ], "range": [ 162, 193 ], "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 35 } } }, "arguments": [ { "type": "Literal", "value": "should create an observable emits key-value pair", "raw": "'should create an observable emits key-value pair'", "range": [ 194, 244 ], "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 86 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 272, 274 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 277, 287 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 27 } } }, "property": { "type": "Identifier", "name": "pairs", "range": [ 288, 293 ], "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 33 } } }, "range": [ 277, 293 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 33 } } }, "arguments": [ { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 296, 297 ], "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 37 } } }, "value": { "type": "Literal", "value": 1, "raw": "1", "range": [ 299, 300 ], "loc": { "start": { "line": 7, "column": 39 }, "end": { "line": 7, "column": 40 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 296, 300 ], "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 40 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "b", "range": [ 302, 303 ], "loc": { "start": { "line": 7, "column": 42 }, "end": { "line": 7, "column": 43 } } }, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 305, 306 ], "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 46 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 302, 306 ], "loc": { "start": { "line": 7, "column": 42 }, "end": { "line": 7, "column": 46 } } } ], "range": [ 294, 308 ], "loc": { "start": { "line": 7, "column": 34 }, "end": { "line": 7, "column": 48 } } }, { "type": "Identifier", "name": "rxTestScheduler", "range": [ 310, 325 ], "loc": { "start": { "line": 7, "column": 50 }, "end": { "line": 7, "column": 65 } } } ], "range": [ 277, 326 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 66 } } }, "range": [ 272, 326 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 66 } } } ], "kind": "var", "range": [ 268, 327 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 67 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 340, 348 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "(ab|)", "raw": "'(ab|)'", "range": [ 351, 358 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 30 } } }, "range": [ 340, 358 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 30 } } } ], "kind": "var", "range": [ 336, 359 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 31 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 372, 378 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 395, 396 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "a", "raw": "'a'", "range": [ 399, 402 ], "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 19 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 404, 405 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 22 } } } ], "range": [ 398, 406 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 23 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 395, 406 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 23 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "b", "range": [ 420, 421 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 13 } } }, "value": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "b", "raw": "'b'", "range": [ 424, 427 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 19 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 429, 430 ], "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 22 } } } ], "range": [ 423, 431 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 23 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 420, 431 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 23 } } } ], "range": [ 381, 441 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 12, "column": 9 } } }, "range": [ 372, 441 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 12, "column": 9 } } } ], "kind": "var", "range": [ 368, 442 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 12, "column": 10 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 451, 467 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "e1", "range": [ 468, 470 ], "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 13, "column": 27 } } } ], "range": [ 451, 471 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 28 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 472, 476 ], "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 33 } } }, "range": [ 451, 476 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 477, 485 ], "loc": { "start": { "line": 13, "column": 34 }, "end": { "line": 13, "column": 42 } } }, { "type": "Identifier", "name": "values", "range": [ 487, 493 ], "loc": { "start": { "line": 13, "column": 44 }, "end": { "line": 13, "column": 50 } } } ], "range": [ 451, 494 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 51 } } }, "range": [ 451, 495 ],