UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,250 lines (1,249 loc) 636 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 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Notification", "range": [ 89, 101 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 16 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 104, 106 ], "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 21 } } }, "property": { "type": "Identifier", "name": "Notification", "range": [ 107, 119 ], "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 34 } } }, "range": [ 104, 119 ], "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 34 } } }, "range": [ 89, 119 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 34 } } } ], "kind": "var", "range": [ 85, 120 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 35 } }, "trailingComments": [ { "type": "Block", "value": "* @test {dematerialize} ", "range": [ 121, 149 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 28 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 150, 158 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.dematerialize", "raw": "'Observable.prototype.dematerialize'", "range": [ 159, 195 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 45 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 215, 224 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "dematerialize", "raw": "'dematerialize'", "range": [ 225, 240 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 29 } } } ], "range": [ 215, 241 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 30 } } }, "arguments": [ { "type": "Literal", "value": "should dematerialize an Observable", "raw": "'should dematerialize an Observable'", "range": [ 242, 278 ], "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 67 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 306, 312 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 329, 330 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 13 } } }, "value": { "type": "Literal", "value": "{x}", "raw": "'{x}'", "range": [ 332, 337 ], "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 20 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 329, 337 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 20 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "b", "range": [ 351, 352 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 13 } } }, "value": { "type": "Literal", "value": "{y}", "raw": "'{y}'", "range": [ 354, 359 ], "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 20 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 351, 359 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "c", "range": [ 373, 374 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 13 } } }, "value": { "type": "Literal", "value": "{z}", "raw": "'{z}'", "range": [ 376, 381 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 20 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 373, 381 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "d", "range": [ 395, 396 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 13 } } }, "value": { "type": "Literal", "value": "|", "raw": "'|'", "range": [ 398, 401 ], "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 18 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 395, 401 ], "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 18 } } } ], "range": [ 315, 411 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 13, "column": 9 } } }, "range": [ 306, 411 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 13, "column": 9 } } } ], "kind": "var", "range": [ 302, 412 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 13, "column": 10 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 425, 427 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 430, 433 ], "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--c--d-|", "raw": "'--a--b--c--d-|'", "range": [ 434, 450 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 37 } } }, { "type": "Identifier", "name": "values", "range": [ 452, 458 ], "loc": { "start": { "line": 14, "column": 39 }, "end": { "line": 14, "column": 45 } } } ], "range": [ 430, 459 ], "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 46 } } }, "range": [ 425, 459 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 46 } } } ], "kind": "var", "range": [ 421, 460 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 47 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 473, 481 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 20 } } }, "init": { "type": "Literal", "value": "--x--y--z--|", "raw": "'--x--y--z--|'", "range": [ 484, 498 ], "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 37 } } }, "range": [ 473, 498 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 37 } } } ], "kind": "var", "range": [ 469, 499 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 512, 518 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 521, 523 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 23 } } }, "property": { "type": "Identifier", "name": "map", "range": [ 524, 527 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 27 } } }, "range": [ 521, 527 ], "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 27 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 538, 539 ], "loc": { "start": { "line": 16, "column": 38 }, "end": { "line": 16, "column": 39 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "x", "range": [ 559, 560 ], "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 17 } } }, "right": { "type": "Literal", "value": "|", "raw": "'|'", "range": [ 565, 568 ], "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 25 } } }, "range": [ 559, 568 ], "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 25 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Notification", "range": [ 595, 607 ], "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 35 } } }, "property": { "type": "Identifier", "name": "createComplete", "range": [ 608, 622 ], "loc": { "start": { "line": 18, "column": 36 }, "end": { "line": 18, "column": 50 } } }, "range": [ 595,