UNPKG

@reactivex/rxjs

Version:

Reactive Extensions for modern JavaScript

1,158 lines (1,157 loc) 1.22 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": "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 } }, "trailingComments": [ { "type": "Block", "value": "* @test {distinctUntilKeyChanged} ", "range": [ 53, 91 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 38 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "describe", "range": [ 92, 100 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": "Observable.prototype.distinctUntilKeyChanged", "raw": "'Observable.prototype.distinctUntilKeyChanged'", "range": [ 101, 147 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 55 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "asDiagram", "range": [ 167, 176 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 13 } } }, "arguments": [ { "type": "Literal", "value": "distinctUntilKeyChanged('k')", "raw": "'distinctUntilKeyChanged(\\'k\\')'", "range": [ 177, 209 ], "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 46 } } } ], "range": [ 167, 210 ], "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 47 } } }, "arguments": [ { "type": "Literal", "value": "should distinguish between values", "raw": "'should distinguish between values'", "range": [ 211, 246 ], "loc": { "start": { "line": 5, "column": 48 }, "end": { "line": 5, "column": 83 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "values", "range": [ 274, 280 ], "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 18 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 285, 286 ], "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } } }, "value": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "k", "range": [ 290, 291 ], "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 29 } } }, "value": { "type": "Literal", "value": 1, "raw": "1", "range": [ 293, 294 ], "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 6, "column": 32 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 290, 294 ], "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 32 } } } ], "range": [ 288, 296 ], "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 34 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 285, 296 ], "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 34 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "b", "range": [ 298, 299 ], "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 37 } } }, "value": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "k", "range": [ 303, 304 ], "loc": { "start": { "line": 6, "column": 41 }, "end": { "line": 6, "column": 42 } } }, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 306, 307 ], "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 6, "column": 45 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 303, 307 ], "loc": { "start": { "line": 6, "column": 41 }, "end": { "line": 6, "column": 45 } } } ], "range": [ 301, 309 ], "loc": { "start": { "line": 6, "column": 39 }, "end": { "line": 6, "column": 47 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 298, 309 ], "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 47 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "c", "range": [ 311, 312 ], "loc": { "start": { "line": 6, "column": 49 }, "end": { "line": 6, "column": 50 } } }, "value": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "k", "range": [ 316, 317 ], "loc": { "start": { "line": 6, "column": 54 }, "end": { "line": 6, "column": 55 } } }, "value": { "type": "Literal", "value": 3, "raw": "3", "range": [ 319, 320 ], "loc": { "start": { "line": 6, "column": 57 }, "end": { "line": 6, "column": 58 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 316, 320 ], "loc": { "start": { "line": 6, "column": 54 }, "end": { "line": 6, "column": 58 } } } ], "range": [ 314, 322 ], "loc": { "start": { "line": 6, "column": 52 }, "end": { "line": 6, "column": 60 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 311, 322 ], "loc": { "start": { "line": 6, "column": 49 }, "end": { "line": 6, "column": 60 } } } ], "range": [ 283, 324 ], "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 62 } } }, "range": [ 274, 324 ], "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 62 } } } ], "kind": "var", "range": [ 270, 325 ], "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 63 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "e1", "range": [ 338, 340 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 14 } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hot", "range": [ 343, 346 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 20 } } }, "arguments": [ { "type": "Literal", "value": "-a--b-b----a-c-|", "raw": "'-a--b-b----a-c-|'", "range": [ 347, 365 ], "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 39 } } }, { "type": "Identifier", "name": "values", "range": [ 367, 373 ], "loc": { "start": { "line": 7, "column": 41 }, "end": { "line": 7, "column": 47 } } } ], "range": [ 343, 374 ], "loc": { "start": { "line": 7, "column": 17 }, "end": { "line": 7, "column": 48 } } }, "range": [ 338, 374 ], "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 7, "column": 48 } } } ], "kind": "var", "range": [ 334, 375 ], "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 49 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "expected", "range": [ 388, 396 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 20 } } }, "init": { "type": "Literal", "value": "-a--b------a-c-|", "raw": "'-a--b------a-c-|'", "range": [ 399, 417 ], "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 41 } } }, "range": [ 388, 417 ], "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 8, "column": 41 } } } ], "kind": "var", "range": [ 384, 418 ], "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 42 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "result", "range": [ 431, 437 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 18 } } }, "init": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "e1", "range": [ 440, 442 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 23 } } }, "property": { "type": "Identifier", "name": "distinctUntilKeyChanged", "range": [ 443, 466 ], "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 47 } } }, "range": [ 440, 466 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 47 } } }, "arguments": [ { "type": "Literal", "value": "k", "raw": "'k'", "range": [ 467, 470 ], "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 9, "column": 51 } } } ], "range": [ 440, 471 ], "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 52 } } }, "range": [ 431, 471 ], "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 52 } } } ], "kind": "var", "range": [ 427, 472 ], "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 53 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "expectObservable", "range": [ 481, 497 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 24 } } }, "arguments": [ { "type": "Identifier", "name": "result", "range": [ 498, 504 ], "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 31 } } } ], "range": [ 481, 505 ], "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 32 } } }, "property": { "type": "Identifier", "name": "toBe", "range": [ 506, 510 ], "loc": { "start": { "line": 10, "column": 33 }, "end": { "line": 10, "column": 37 } }