@reactivex/rxjs
Version:
Reactive Extensions for modern JavaScript
1,309 lines (1,308 loc) • 716 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 {skipWhile} ",
"range": [
115,
139
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 24
}
}
}
]
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
140,
148
],
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Observable.prototype.skipWhile",
"raw": "'Observable.prototype.skipWhile'",
"range": [
149,
181
],
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 41
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "asDiagram",
"range": [
201,
210
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": [
{
"type": "Literal",
"value": "skipWhile(x => x < 4)",
"raw": "'skipWhile(x => x < 4)'",
"range": [
211,
234
],
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 37
}
}
}
],
"range": [
201,
235
],
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 38
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should skip all elements until predicate is false",
"raw": "'should skip all elements until predicate is false'",
"range": [
236,
287
],
"loc": {
"start": {
"line": 7,
"column": 39
},
"end": {
"line": 7,
"column": 90
}
}
},
{
"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": "hot",
"range": [
324,
327
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 24
}
}
},
"arguments": [
{
"type": "Literal",
"value": "-1-^2--3--4--5--6--|",
"raw": "'-1-^2--3--4--5--6--|'",
"range": [
328,
350
],
"loc": {
"start": {
"line": 8,
"column": 25
},
"end": {
"line": 8,
"column": 47
}
}
}
],
"range": [
324,
351
],
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 48
}
}
},
"range": [
315,
351
],
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 48
}
}
}
],
"kind": "var",
"range": [
311,
352
],
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 49
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "sourceSubs",
"range": [
365,
375
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 22
}
}
},
"init": {
"type": "Literal",
"value": "^ !",
"raw": "'^ !'",
"range": [
378,
397
],
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 44
}
}
},
"range": [
365,
397
],
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 44
}
}
}
],
"kind": "var",
"range": [
361,
398
],
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 45
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "expected",
"range": [
411,
419
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 20
}
}
},
"init": {
"type": "Literal",
"value": "-------4--5--6--|",
"raw": "'-------4--5--6--|'",
"range": [
422,
441
],
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 42
}
}
},
"range": [
411,
441
],
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 42
}
}
}
],
"kind": "var",
"range": [
407,
442
],
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 43
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "predicate",
"range": [
455,
464
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 21
}
}
},
"init": {
"type": "FunctionExpression",
"id": null,
"params": [
{
"type": "Identifier",
"name": "v",
"range": [
477,
478
],
"loc": {
"start": {
"line": 11,
"column": 34
},
"end": {
"line": 11,
"column": 35
}
}
}
],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ReturnStatement",
"argument": {
"type": "BinaryExpression",
"operator": "<",
"left": {
"type": "UnaryExpression",
"operator": "+",
"argument": {
"type": "Identifier",
"name": "v",
"range": [
502,
503
],
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 21
}
}
},
"prefix": true,
"range": [
501,
503
],
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 21
}
}
},
"right": {
"type": "Literal",
"value": 4,
"raw": "4",
"range": [
506,
507
],
"loc": {
"start": {
"line": 12,
"column": 24
},
"end": {
"line": 12,
"column": 25
}
}
},
"range": [
501,
507
],
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 25
}
}
},
"range": [
494,
508
],
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 26
}
}
}
],
"range": [
480,
518
],
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 13,
"column": 9
}
}
},
"generator": false,
"expression": false,
"range": [
467,
518
],
"loc": {
"start": {
"line": 11,
"column": 24
},
"end": {
"line": 13,
"column": 9
}
}
},
"range": [
455,
518
],
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 13,
"column": 9
}
}
}
],
"kind": "var",
"range": [
451,
519
],
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 13,
"column": 10
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectObservable",
"range": [
528,
544
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 24
}
}
},
"arguments": [
{
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
545,
551
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"name": "skipWhile",
"range": [
552,
561
],
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 41
}
}
},
"range": [
545,
561
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 41
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "predicate",
"range": [
562,
571
],
"loc": {
"start": {
"line": 14,
"column": 42
},
"end": {
"line": 14,
"column": 51
}
}
}
],
"range": [
545,
572
],
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 52
}
}
}
],
"range": [
528,
573
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 53
}
}
},
"property": {
"type": "Identifier",
"name": "toBe",
"range": [
574,
578
],
"loc": {
"start": {
"line": 14,
"column": 54
},
"end": {
"line": 14,
"column": 58
}
}
},
"range": [
528,
578
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 58
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "expected",
"range": [
579,
587
],
"loc": {
"start": {
"line": 14,
"column": 59
},
"end": {
"line": 14,
"column": 67
}
}
}
],
"range": [
528,
588
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 68
}
}
},
"range": [
528,
589
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 69
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "expectSubscriptions",
"range": [
598,
617
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 27
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "source",
"range": [
618,
624
],
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 34
}
}
},
"property": {
"type": "Identifier",
"name": "subscriptions",
"range": [
625,
638
],
"loc": {
"start": {
"line": 15,
"column": 35
},
"end": {
"line": 15,
"column": 48
}
}
},
"range": [
618,
638
],
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 48
}
}
}
],
"range": [
598,
639
],
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 49
}
}
},
"property": {
"type": "Identifier",