UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,224 lines (1,223 loc) 1.19 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": "sinon", "range": [ 48, 53 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 9 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 56, 63 ], "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 19 } } }, "arguments": [ { "type": "Literal", "value": "sinon", "raw": "'sinon'", "range": [ 64, 71 ], "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 27 } } } ], "range": [ 56, 72 ], "loc": { "start": { "line": 3, "column": 12 }, "end": { "line": 3, "column": 28 } } }, "range": [ 48, 72 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 28 } } } ], "kind": "var", "range": [ 44, 73 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 29 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Rx", "range": [ 78, 80 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 6 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require", "range": [ 83, 90 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 16 } } }, "arguments": [ { "type": "Literal", "value": "../../dist/cjs/Rx", "raw": "'../../dist/cjs/Rx'", "range": [ 91, 110 ], "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 36 } } } ], "range": [ 83, 111 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 37 } } }, "range": [ 78, 111 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 37 } } } ], "kind": "var", "range": [ 74, 112 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 38 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "Observable", "range": [ 117, 127 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 14 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Rx", "range": [ 130, 132 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 19 } } }, "property": { "type": "Identifier", "name": "Observable", "range": [ 133, 143 ], "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 30 } } }, "range": [ 130, 143 ], "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 5, "column": 30 } } }, "range": [ 117, 143 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 30 } } } ], "kind": "var", "range": [ 113, 144 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 31 } }, "trailingComments": [ { "type": "Block", "value": "* @test {bindNodeCallback} ", "range": [ 145, 176 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 31 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 177, 185 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.bindNodeCallback", "raw": "'Observable.bindNodeCallback'", "range": [ 186, 215 ], "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 38 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 235, 243 ], "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 12 } } }, "arguments": [ { "type": "Literal", "value": "when not scheduled", "raw": "'when not scheduled'", "range": [ 244, 264 ], "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 33 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "it", "range": [ 288, 290 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 10 } } }, "arguments": [ { "type": "Literal", "value": "should emit one value from a callback", "raw": "'should emit one value from a callback'", "range": [ 291, 330 ], "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 50 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "callback", "range": [ 367, 375 ], "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 29 } } }, "params": [ { "type": "Identifier", "name": "datum", "range": [ 376, 381 ], "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 35 } } }, { "type": "Identifier", "name": "cb", "range": [ 383, 385 ], "loc": { "start": { "line": 10, "column": 37 }, "end": { "line": 10, "column": 39 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cb", "range": [ 405, 407 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 18 } } }, "arguments": [ { "type": "Literal", "value": null, "raw": "null", "range": [ 408, 412 ], "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 23 } } }, { "type": "Identifier", "name": "datum", "range": [ 414, 419 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 30 } } } ], "range": [ 405, 420 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 31 } } }, "range": [ 405, 421 ], "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 32 } } } ], "range": [ 387, 435 ], "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 12, "column": 13 } } }, "generator": false, "expression": false, "range": [ 358, 435 ], "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 12, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "boundCallback", "range": [ 452, 465 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 29 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Observable", "range": [ 468, 478 ], "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 42 } } }, "property": { "type": "Identifier", "name": "bindNodeCallback", "range": [ 479, 495 ], "loc": { "start": { "line": 13, "column": 43 }, "end": { "line": 13, "column": 59 } } }, "range": [ 468, 495 ], "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 59 } } }, "arguments": [ { "type": "Identifier", "name": "callback", "range": [ 496, 504 ], "loc": { "start": { "line": 13, "column": 60 }, "end": { "line": 13, "column": 68 } } } ], "range": [ 468, 505 ], "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 69 } } }, "range": [ 452, 505 ], "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 69 } } } ], "kind": "var", "range": [ 448, 506 ], "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 70 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "results", "range": [ 523, 530 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 23 } } }, "init": { "type": "ArrayExpression", "elements": [], "range": [ 533, 535 ], "loc": { "start": { "line": 14, "column": 26 }, "end": { "line": 14, "column": 28 } } }, "range": [ 523, 535 ], "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 28 } } } ], "kind": "var", "range": [ 519, 536 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 29 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "boundCallback", "range": [ 549, 562 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 25 } } }, "arguments": [ { "type": "Literal", "value": 42, "raw": "42", "range": [ 563, 565 ], "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 28 } } } ], "range": [ 549, 566 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 29 } } }, "property": { "type": "Identifier", "name": "subscribe", "range": [ 584, 593 ], "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 26 } } }, "range": [ 549, 593 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 16, "column": 26 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 604, 605 ], "loc": { "start": { "line": 16, "column": 37 }, "end": { "line": 16, "column": 38 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "results", "range": [ 625, 632 ], "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 23 } } }, "property": { "type": "Identifier", "name": "push", "range": [ 633, 637 ], "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 28 } } }, "range": [ 625, 637 ], "loc": {