@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,288 lines (1,287 loc) • 998 kB
JSON
{
"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 {min} ",
"range": [
115,
133
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 18
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
134,
142
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.min",
"raw": "'Observable.prototype.min'",
"range": [
143,
169
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 35
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
189,
198
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "min",
"raw": "'min'",
"range": [
199,
204
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 19
}
}
}
],
"range": [
189,
205
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 20
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should min the values of an observable",
"raw": "'should min the values of an observable'",
"range": [
206,
246
],
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 61
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
274,
280
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 18
}
}
},
"init": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "hot",
"range": [
283,
286
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 24
}
}
},
"arguments": [
{
"type": "Literal",
"value": "--a--b--c--|",
"raw": "'--a--b--c--|'",
"range": [
287,
301
],
"loc": {
"start": {
"line": 8,
"column": 25
},
"end": {
"line": 8,
"column": 39
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "a",
"range": [
305,
306
],
"loc": {
"start": {
"line": 8,
"column": 43
},
"end": {
"line": 8,
"column": 44
}
}
},
"value": {
"type": "Literal",
"value": 42,
"raw": "42",
"range": [
308,
310
],
"loc": {
"start": {
"line": 8,
"column": 46
},
"end": {
"line": 8,
"column": 48
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
305,
310
],
"loc": {
"start": {
"line": 8,
"column": 43
},
"end": {
"line": 8,
"column": 48
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "b",
"range": [
312,
313
],
"loc": {
"start": {
"line": 8,
"column": 50
},
"end": {
"line": 8,
"column": 51
}
}
},
"value": {
"type": "UnaryExpression",
"operator": "-",
"argument": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
316,
317
],
"loc": {
"start": {
"line": 8,
"column": 54
},
"end": {
"line": 8,
"column": 55
}
}
},
"prefix": true,
"range": [
315,
317
],
"loc": {
"start": {
"line": 8,
"column": 53
},
"end": {
"line": 8,
"column": 55
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
312,
317
],
"loc": {
"start": {
"line": 8,
"column": 50
},
"end": {
"line": 8,
"column": 55
}
}
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "c",
"range": [
319,
320
],
"loc": {
"start": {
"line": 8,
"column": 57
},
"end": {
"line": 8,
"column": 58
}
}
},
"value": {
"type": "Literal",
"value": 3,
"raw": "3",
"range": [
322,
323
],
"loc": {
"start": {
"line": 8,
"column": 60
},
"end": {
"line": 8,
"column": 61
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
319,
323
],
"loc": {
"start": {
"line": 8,
"column": 57
},
"end": {
"line": 8,
"column": 61
}
}
}
],
"range": [
303,
325
],
"loc": {
"start": {
"line": 8,
"column": 41
},
"end": {
"line": 8,
"column": 63
}
}
}
],
"range": [
283,
326
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 64
}
}
},
"range": [
274,
326
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 64
}
}
}
],
"kind": "var",
"range": [
270,
327
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 65
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "subs",
"range": [
340,
344
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
347,
361
],
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 33
}
}
},
"range": [
340,
361
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 33
}
}
}
],
"kind": "var",
"range": [
336,
362
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 34
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
375,
383
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-----------(x|)",
"raw": "'-----------(x|)'",
"range": [
386,
403
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 40
}
}
},
"range": [
375,
403
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 40
}
}
}
],
"kind": "var",
"range": [
371,
404
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 41
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
413,
429
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
430,
436
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "min",
"range": [
437,
440
],
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 35
}
}
},
"range": [
430,
440
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 35
}
}
},
"arguments": [],
"range": [
430,
442
],
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 37
}
}
}
],
"range": [
413,
443
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 38
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
444,
448
],
"loc": {
"start": {
"line": 11,
"column": 39
},
"end": {
"line": 11,
"column": 43
}
}
},
"range": [
413,
448
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 43
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
449,
457
],
"loc": {
"start": {
"line": 11,
"column": 44
},
"end": {
"line": 11,
"column": 52
}
}
},
{
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "x",
"range": [
461,
462
],
"loc": {
"start": {
"line": 11,
"column": 56
},
"end": {
"line": 11,
"column": 57
}
}
},
"value": {
"type": "UnaryExpression",
"operator": "-",
"argument": {
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
465,
466
],
"loc": {
"start": {
"line": 11,
"column": 60
},
"end": {
"line": 11,
"column": 61
}
}
},
"prefix": true,
"range": [
464,
466
],
"loc": {
"start": {
"line": 11,
"column": 59
},
"end": {
"line": 11,
"column": 61
}
}
},
"kind": "init",
"method": false,
"shorthand": false,
"computed": false,
"range": [
461,
466
],
"loc": {
"start": {
"line": 11,
"column": 56
},
"end": {
"line": 11,
"column": 61
}
}
}
],
"range": [
459,
468
],
"loc": {
"start": {
"line": 11,
"column": 54
},
"end": {
"line": 11,
"column": 63
}
}
}
],
"range": [
413,
469
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 64
}
}
},
"range": [
413,
470
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {