UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,361 lines (1,360 loc) 1.1 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 {every} ", "range": [ 115, 135 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 20 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 136, 144 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.every", "raw": "'Observable.prototype.every'", "range": [ 145, 173 ], "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 37 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "truePredicate", "range": [ 202, 215 ], "loc": { "start": { "line": 7, "column": 13 }, "end": { "line": 7, "column": 26 } } }, "params": [ { "type": "Identifier", "name": "x", "range": [ 216, 217 ], "loc": { "start": { "line": 7, "column": 27 }, "end": { "line": 7, "column": 28 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Literal", "value": true, "raw": "true", "range": [ 236, 240 ], "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 19 } } }, "range": [ 229, 241 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 20 } } } ], "range": [ 219, 247 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 9, "column": 5 } } }, "generator": false, "expression": false, "range": [ 193, 247 ], "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 9, "column": 5 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "predicate", "range": [ 261, 270 ], "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 22 } } }, "params": [ { "type": "Identifier", "name": "x", "range": [ 271, 272 ], "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 24 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "===", "left": { "type": "BinaryExpression", "operator": "%", "left": { "type": "Identifier", "name": "x", "range": [ 291, 292 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 16 } } }, "right": { "type": "Literal", "value": 5, "raw": "5", "range": [ 295, 296 ], "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 20 } } }, "range": [ 291, 296 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 20 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 301, 302 ], "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 26 } } }, "range": [ 291, 302 ], "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 26 } } }, "range": [ 284, 303 ], "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 27 } } } ], "range": [ 274, 309 ], "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 12, "column": 5 } } }, "generator": false, "expression": false, "range": [ 252, 309 ], "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 12, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 314, 323 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "every(x => x % 5 === 0)", "raw": "'every(x => x % 5 === 0)'", "range": [ 324, 349 ], "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 39 } } } ], "range": [ 314, 350 ], "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 40 } } }, "arguments": [ { "type": "Literal", "value": "should return false if only some of element matches with predicate", "raw": "'should return false if only some of element matches with predicate'", "range": [ 351, 419 ], "loc": { "start": { "line": 13, "column": 41 }, "end": { "line": 13, "column": 109 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "source", "range": [ 447, 453 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 456, 459 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 24 } } }, "arguments": [ { "type": "Literal", "value": "--a--b--c--d--e--|", "raw": "'--a--b--c--d--e--|'", "range": [ 460, 480 ], "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 45 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 484, 485 ], "loc": { "start": { "line": 14, "column": 49 }, "end": { "line": 14, "column": 50 } } }, "value": { "type": "Literal", "value": 5, "raw": "5", "range": [ 487, 488 ], "loc": { "start": { "line": 14, "column": 52 }, "end": { "line": 14, "column": 53 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 484, 488 ], "loc": { "start": { "line": 14, "column": 49 }, "end": { "line": 14, "column": 53 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "b", "range": [ 490, 491 ], "loc": { "start": { "line": 14, "column": 55 }, "end": { "line": 14, "column": 56 } } }, "value": { "type": "Literal", "value": 10, "raw": "10", "range": [ 493, 495 ], "loc": { "start": { "line": 14, "column": 58 }, "end": { "line": 14, "column": 60 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 490, 495 ], "loc": { "start": { "line": 14, "column": 55 }, "end": { "line": 14, "column": 60 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "c", "range": [ 497, 498 ], "loc": { "start": { "line": 14, "column": 62 }, "end": { "line": 14, "column": 63 } } }, "value": { "type": "Literal", "value": 15, "raw": "15", "range": [ 500, 502 ], "loc": { "start": { "line": 14, "column": 65 }, "end": { "line": 14, "column": 67 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 497, 502 ], "loc": { "start": { "line": 14, "column": 62 }, "end": { "line": 14, "column": 67 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "d", "range": [ 504, 505 ], "loc": { "start": { "line": 14, "column": 69 }, "end": { "line": 14, "column": 70 } } }, "value": { "type": "Literal", "value": 18, "raw": "18", "range": [ 507, 509 ], "loc": { "start": { "line": 14, "column": 72 }, "end": { "line": 14, "column": 74 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 504, 509 ], "loc": { "start": { "line": 14, "column": 69 }, "end": { "line": 14, "column": 74 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "e", "range": [ 511, 512 ], "loc": { "start": { "line": 14, "column": 76 }, "end": { "line": 14, "column": 77 } } }, "value": { "type": "Literal", "value": 20, "raw": "20", "range": [ 514, 516 ], "loc": { "start": { "line": 14, "column": 79 }, "end": { "line": 14, "column": 81 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 511, 516 ], "loc": { "start": { "line": 14, "column": 76 }, "end": { "line": 14, "column": 81 } } } ], "range": [ 482, 518 ], "loc": { "start": { "line": 14, "column": 47 }, "end": { "line": 14, "column": 83 } } } ], "range": [ 456, 519 ], "loc": { "start": { "line": 14, "column": 21 }, "end": { "line": 14, "column": 84 } } }, "range": [ 447, 519 ], "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 84 } } } ], "kind": "var", "range": [ 443, 520 ], "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 85 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "sourceSubs", "range": [ 533, 543 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 22 } } }, "init": { "type": "Literal", "value": "^ ! ", "raw": "'^ ! '", "range": [ 546, 566 ], "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 45 } } }, "range": [ 533, 566 ], "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 45 } } } ], "kind": "var", "range": [ 529, 567 ], "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 46 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 580, 588 ], "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 20 } } }, "init": { "type": "Literal", "value": "-----------(F|) ", "raw": "'-----------(F|) '", "range": [ 591, 611 ], "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 43 } } }, "range": [