UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,345 lines (1,344 loc) 1.59 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": "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 } }, "trailingComments": [ { "type": "Block", "value": "* @test {publishBehavior} ", "range": [ 115, 145 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 30 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 146, 154 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.publishBehavior", "raw": "'Observable.prototype.publishBehavior'", "range": [ 155, 193 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 47 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 213, 222 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "publishBehavior(0)", "raw": "'publishBehavior(0)'", "range": [ 223, 243 ], "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 34 } } } ], "range": [ 213, 244 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 35 } } }, "arguments": [ { "type": "Literal", "value": "should mirror a simple source Observable", "raw": "'should mirror a simple source Observable'", "range": [ 245, 287 ], "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 78 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 315, 321 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cold", "range": [ 324, 328 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": "--1-2---3-4--5-|", "raw": "'--1-2---3-4--5-|'", "range": [ 329, 347 ], "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 44 } } } ], "range": [ 324, 348 ], "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 45 } } }, "range": [ 315, 348 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 45 } } } ], "kind": "var", "range": [ 311, 349 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sourceSubs", "range": [ 362, 372 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 22 } } }, "init": { "type": "Literal", "value": "^ !", "raw": "'^ !'", "range": [ 375, 393 ], "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 43 } } }, "range": [ 362, 393 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 43 } } } ], "kind": "var", "range": [ 358, 394 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 44 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "published", "range": [ 407, 416 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 21 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 419, 425 ], "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 30 } } }, "property": { "type": "Identifier", "name": "publishBehavior", "range": [ 426, 441 ], "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 46 } } }, "range": [ 419, 441 ], "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 46 } } }, "arguments": [ { "type": "Literal", "value": "0", "raw": "'0'", "range": [ 442, 445 ], "loc": { "start": { "line": 10, "column": 47 }, "end": { "line": 10, "column": 50 } } } ], "range": [ 419, 446 ], "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 51 } } }, "range": [ 407, 446 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 51 } } } ], "kind": "var", "range": [ 403, 447 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 52 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 460, 468 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 20 } } }, "init": { "type": "Literal", "value": "0-1-2---3-4--5-|", "raw": "'0-1-2---3-4--5-|'", "range": [ 471, 489 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 41 } } }, "range": [ 460, 489 ], "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 41 } } } ], "kind": "var", "range": [ 456, 490 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 42 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 499, 515 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "published", "range": [ 516, 525 ], "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 34 } } } ], "range": [ 499, 526 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 35 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 527, 531 ], "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 12, "column": 40 } } }, "range": [ 499, 531 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 40 } } }, "arguments": [ { "type": "Identifier", "name": "expected", "range": [ 532, 540 ], "loc": { "start": { "line": 12, "column": 41 }, "end": { "line": 12, "column": 49 } } } ], "range": [ 499, 541 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 50 } } }, "range": [ 499, 542 ], "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 51 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectSubscriptions", "range": [ 551, 570 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 27 } } }, "arguments": [ { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "source", "range": [ 571, 577 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 34 } } }, "property": { "type": "Identifier", "name": "subscriptions", "range": [ 578, 591 ], "loc": { "start": { "line": 13, "column": 35 }, "end": { "line": 13, "column": 48 } } }, "range": [ 571, 591 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 48 } } } ], "range": [ 551, 592 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 49 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 593, 597 ], "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 13, "column": 54 } } }, "range": [ 551, 597 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 54 } } }, "arguments": [ { "type": "Identifier", "name": "sourceSubs", "range": [ 598, 608 ], "loc": { "start": { "line": 13, "column": 55 }, "end": { "line": 13, "column": 65 } } } ], "range": [ 551, 609 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 66 } } }, "range": [ 551, 610 ], "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 67 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "published", "range": [ 619, 628 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 17 } } }, "property": { "type": "Identifier", "name": "connect", "range": [ 629, 636 ], "loc": { "start": { "line": 14, "column": 18 }, "end": { "line": 14, "column": 25 } } }, "range": [ 619, 636 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 25 } } }, "arguments": [], "range": [ 619, 638 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 27 } } }, "range": [ 619, 639 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 28