Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
series.js
LineChart.svelte
runes
This component is not in runes mode.
To enable runes mode, either start using runes in your code, or add the following to the top of your component:
<svelte:options runes />
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
⌄
⌄
⌄
⌄
⌄
<script>
import LineChart from './LineChart.svelte';
import series from './series.js';
let auto = true;
let y1 = Infinity;
let y2 = -Infinity;
series
.sort((a, b) => b[b.length - 1].y - a[a.length - 1].y)
.forEach(s => {
s.forEach(d => {
if (d.y < y1) y1 = d.y;
if (d.y > y2) y2 = d.y;
});
});
</script>
<div class="chart">
<div class="controls">
<label>
<input type="radio" bind:group={auto} value={true}> Individual scales
</label>
<label>
<input type="radio" bind:group={auto} value={false}> Shared scales
</label>
</div>
{#each series as s}
<div class="multiple">
<LineChart auto={auto} {y1} {y2} data={s}/>
</div>
{/each}
</div>
resolving https://unpkg.com/svelte@5.20.5/src/version.js
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
import 'svelte/internal/disclose-version';
import 'svelte/internal/flags/legacy';
import * as $ from 'svelte/internal/client';
import LineChart from './LineChart.svelte';
import series from './series.js';
var root_1 = $.template(`<div class="multiple"><!></div>`);
var root = $.template(`<div class="chart svelte-zafd20"><div class="controls svelte-zafd20"><label class="svelte-zafd20"><input type="radio"> Individual scales</label> <label class="svelte-zafd20"><input type="radio"> Shared scales</label></div> <!></div>`);
export default function App($$anchor, $$props) {
$.push($$props, false);
const binding_group = [];
let auto = $.mutable_state(true);
let y1 = $.mutable_state(Infinity);
let y2 = $.mutable_state(-Infinity);
series.sort((a, b) => b[b.length - 1].y - a[a.length - 1].y).forEach((s) => {
s.forEach((d) => {
if (d.y < $.get(y1)) $.set(y1, d.y);
if (d.y > $.get(y2)) $.set(y2, d.y);
});
});
$.init();
var div = root();
var div_1 = $.child(div);
var label = $.child(div_1);
var input = $.child(label);
$.remove_input_defaults(input);
input.value = null == (input.__value = true) ? '' : true;
$.next();
$.reset(label);
result = svelte.compile(source, {
generate: ,
});99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
.chart.svelte-zafd20 {
position: relative;
height: 200px;
padding: 2em 0 0 0;
margin: 0 0 36px 0;
display: grid;
grid-gap: 0.5em;
grid-template-columns: repeat(9, 1fr);
box-sizing: border-box;
}
.controls.svelte-zafd20 {
position: absolute;
left: 0;
top: 0;
}
label.svelte-zafd20 {
display: inline;
}
Root {
css: StyleSheet {...}
- type: "StyleSheet"
- start: 692
- end: 1000
- attributes: []
children: [...] (3)
Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 701
- end: 707
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 701
- end: 707
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "chart"
- start: 701
- end: 707
}
]- start: 701
- end: 707
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 708
- end: 898
children: [...] (8)
Declaration {...}
- type: "Declaration"
- start: 712
- end: 730
- property: "position"
- value: "relative"
} Declaration {...}
- type: "Declaration"
- start: 734
- end: 747
- property: "height"
- value: "200px"
} Declaration {...}
- type: "Declaration"
- start: 751
- end: 769
- property: "padding"
- value: "2em 0 0 0"
} Declaration {...}
- type: "Declaration"
- start: 773
- end: 791
- property: "margin"
- value: "0 0 36px 0"
} Declaration {...}
- type: "Declaration"
- start: 795
- end: 808
- property: "display"
- value: "grid"
} Declaration {...}
- type: "Declaration"
- start: 812
- end: 827
- property: "grid-gap"
- value: "0.5em"
} Declaration {...}
- type: "Declaration"
- start: 831
- end: 868
- property: "grid-template-columns"
- value: "repeat(9, 1fr)"
} Declaration {...}
- type: "Declaration"
- start: 872
- end: 894
- property: "box-sizing"
- value: "border-box"
}
]
}- start: 701
- end: 898
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 901
- end: 910
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 901
- end: 910
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "controls"
- start: 901
- end: 910
}
]- start: 901
- end: 910
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 911
- end: 958
children: [...] (3)
Declaration {...}
- type: "Declaration"
- start: 915
- end: 933
- property: "position"
- value: "absolute"
} Declaration {...}
- type: "Declaration"
- start: 937
- end: 944
- property: "left"
- value: "0"
} Declaration {...}
- type: "Declaration"
- start: 948
- end: 954
- property: "top"
- value: "0"
}
]
}- start: 901
- end: 958
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 962
- end: 967
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 962
- end: 967
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "label"
- start: 962
- end: 967
}
]- start: 962
- end: 967
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 968
- end: 991
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 972
- end: 987
- property: "display"
- value: "inline"
}
]
}- start: 962
- end: 991
}
]content: {...}
- start: 699
- end: 992
- styles: "\n\t.chart {\n\t\tposition: relative;\n\t\theight: 200px;\n\t\tpadding: 2em 0 0 0;\n\t\tmargin: 0 0 36px 0;\n\t\tdisplay: grid;\n\t\tgrid-gap: 0.5em;\n\t\tgrid-template-columns: repeat(9, 1fr);\n\t\tbox-sizing: border-box;\n\t}\n\n\t.controls {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t}\n\t\n\tlabel {\n\t\tdisplay: inline;\n\t}\n"
- comment: null
}
}- js: []
- start: 334
- end: 690
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 332
- end: 334
- raw: "\n\n"
- data: "\n\n"
} RegularElement {...}
- type: "RegularElement"
- start: 334
- end: 690
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 339
- end: 352
- name: "class"
value: [...] (1)
Text {...}
- start: 346
- end: 351
- type: "Text"
- raw: "chart"
- data: "chart"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 353
- end: 355
- raw: "\n\t"
- data: "\n\t"
} RegularElement {...}
- type: "RegularElement"
- start: 355
- end: 571
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 360
- end: 376
- name: "class"
value: [...] (1)
Text {...}
- start: 367
- end: 375
- type: "Text"
- raw: "controls"
- data: "controls"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 377
- end: 380
- raw: "\n\t\t"
- data: "\n\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 380
- end: 471
- name: "label"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 387
- end: 391
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 391
- end: 442
- name: "input"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 398
- end: 410
- name: "type"
value: [...] (1)
Text {...}
- start: 404
- end: 409
- type: "Text"
- raw: "radio"
- data: "radio"
}
]
} BindDirective {...}
- start: 411
- end: 428
- type: "BindDirective"
- name: "group"
expression: Identifier {...}
- type: "Identifier"
- start: 423
- end: 427
loc: {...}
start: {...}
- line: 23
- column: 35
}end: {...}
- line: 23
- column: 39
}
}- name: "auto"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: 429
- end: 441
- name: "value"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 435
- end: 441
expression: Literal {...}
- type: "Literal"
- start: 436
- end: 440
loc: {...}
start: {...}
- line: 23
- column: 48
}end: {...}
- line: 23
- column: 52
}
}- value: true
- raw: "true"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 442
- end: 463
- raw: " Individual scales"
- data: " Individual scales"
}
]
}
} Text {...}
- type: "Text"
- start: 471
- end: 475
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 475
- end: 563
- name: "label"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: ""
- raw: ""
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 482
- end: 486
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 486
- end: 538
- name: "input"
attributes: [...] (3)
Attribute {...}
- type: "Attribute"
- start: 493
- end: 505
- name: "type"
value: [...] (1)
Text {...}
- start: 499
- end: 504
- type: "Text"
- raw: "radio"
- data: "radio"
}
]
} BindDirective {...}
- start: 506
- end: 523
- type: "BindDirective"
- name: "group"
expression: Identifier {...}
- type: "Identifier"
- start: 518
- end: 522
loc: {...}
start: {...}
- line: 27
- column: 35
}end: {...}
- line: 27
- column: 39
}
}- name: "auto"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: 524
- end: 537
- name: "value"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 530
- end: 537
expression: Literal {...}
- type: "Literal"
- start: 531
- end: 536
loc: {...}
start: {...}
- line: 27
- column: 48
}end: {...}
- line: 27
- column: 53
}
}- value: false
- raw: "false"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 538
- end: 555
- raw: " Shared scales"
- data: " Shared scales"
}
]
}
} Text {...}
- type: "Text"
- start: 563
- end: 565
- raw: "\n\t"
- data: "\n\t"
}
]
}
} Text {...}
- type: "Text"
- start: 571
- end: 574
- raw: " "
- data: " "
} EachBlock {...}
- type: "EachBlock"
- start: 574
- end: 683
expression: Identifier {...}
- type: "Identifier"
- start: 581
- end: 587
loc: {...}
start: {...}
- line: 31
- column: 8
}end: {...}
- line: 31
- column: 14
}
}- name: "series"
}body: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 593
- end: 596
- raw: "\n\t\t"
- data: "\n\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 596
- end: 674
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 601
- end: 617
- name: "class"
value: [...] (1)
Text {...}
- start: 608
- end: 616
- type: "Text"
- raw: "multiple"
- data: "multiple"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 618
- end: 622
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} Component {...}
- type: "Component"
- start: 622
- end: 665
- name: "LineChart"
attributes: [...] (4)
Attribute {...}
- type: "Attribute"
- start: 633
- end: 644
- name: "auto"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 638
- end: 644
expression: Identifier {...}
- type: "Identifier"
- start: 639
- end: 643
loc: {...}
start: {...}
- line: 33
- column: 20
}end: {...}
- line: 33
- column: 24
}
}- name: "auto"
}
}
} Attribute {...}
- type: "Attribute"
- start: 645
- end: 649
- name: "y1"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 646
- end: 648
expression: Identifier {...}
- start: 646
- end: 648
- type: "Identifier"
- name: "y1"
}
}
} Attribute {...}
- type: "Attribute"
- start: 650
- end: 654
- name: "y2"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 651
- end: 653
expression: Identifier {...}
- start: 651
- end: 653
- type: "Identifier"
- name: "y2"
}
}
} Attribute {...}
- type: "Attribute"
- start: 655
- end: 663
- name: "data"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 660
- end: 663
expression: Identifier {...}
- type: "Identifier"
- start: 661
- end: 662
loc: {...}
start: {...}
- line: 33
- column: 42
}end: {...}
- line: 33
- column: 43
}
}- name: "s"
}
}
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 665
- end: 668
- raw: "\n\t\t"
- data: "\n\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 674
- end: 676
- raw: "\n\t"
- data: "\n\t"
}
]
}context: Identifier {...}
- type: "Identifier"
- name: "s"
- start: 591
loc: {...}
start: {...}
- line: 31
- column: 18
- character: 591
}end: {...}
- line: 31
- column: 19
- character: 592
}
}- end: 592
- typeAnnotation: undefined
}- index: undefined
- key: undefined
} Text {...}
- type: "Text"
- start: 683
- end: 684
- raw: "\n"
- data: "\n"
}
]
}
} Text {...}
- type: "Text"
- start: 690
- end: 692
- raw: "\n\n"
- data: "\n\n"
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 0
- end: 332
- context: "default"
content: Program {...}
- type: "Program"
- start: 8
- end: 323
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 18
- column: 0
}
}body: [...] (6)
ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 10
- end: 53
loc: {...}
start: {...}
- line: 2
- column: 1
}end: {...}
- line: 2
- column: 44
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 17
- end: 26
loc: {...}
start: {...}
- line: 2
- column: 8
}end: {...}
- line: 2
- column: 17
}
}local: Identifier {...}
- type: "Identifier"
- start: 17
- end: 26
loc: {...}
start: {...}
- line: 2
- column: 8
}end: {...}
- line: 2
- column: 17
}
}- name: "LineChart"
}
}
]source: Literal {...}
- type: "Literal"
- start: 32
- end: 52
loc: {...}
start: {...}
- line: 2
- column: 23
}end: {...}
- line: 2
- column: 43
}
}- value: "./LineChart.svelte"
- raw: "'./LineChart.svelte'"
}
} ImportDeclaration {...}
- type: "ImportDeclaration"
- start: 55
- end: 88
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 34
}
}specifiers: [...] (1)
ImportDefaultSpecifier {...}
- type: "ImportDefaultSpecifier"
- start: 62
- end: 68
loc: {...}
start: {...}
- line: 3
- column: 8
}end: {...}
- line: 3
- column: 14
}
}local: Identifier {...}
- type: "Identifier"
- start: 62
- end: 68
loc: {...}
start: {...}
- line: 3
- column: 8
}end: {...}
- line: 3
- column: 14
}
}- name: "series"
}
}
]source: Literal {...}
- type: "Literal"
- start: 74
- end: 87
loc: {...}
start: {...}
- line: 3
- column: 20
}end: {...}
- line: 3
- column: 33
}
}- value: "./series.js"
- raw: "'./series.js'"
}
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 91
- end: 107
loc: {...}
start: {...}
- line: 5
- column: 1
}end: {...}
- line: 5
- column: 17
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 95
- end: 106
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 5
- column: 16
}
}id: Identifier {...}
- type: "Identifier"
- start: 95
- end: 99
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 5
- column: 9
}
}- name: "auto"
}init: Literal {...}
- type: "Literal"
- start: 102
- end: 106
loc: {...}
start: {...}
- line: 5
- column: 12
}end: {...}
- line: 5
- column: 16
}
}- value: true
- raw: "true"
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 110
- end: 128
loc: {...}
start: {...}
- line: 7
- column: 1
}end: {...}
- line: 7
- column: 19
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 114
- end: 127
loc: {...}
start: {...}
- line: 7
- column: 5
}end: {...}
- line: 7
- column: 18
}
}id: Identifier {...}
- type: "Identifier"
- start: 114
- end: 116
loc: {...}
start: {...}
- line: 7
- column: 5
}end: {...}
- line: 7
- column: 7
}
}- name: "y1"
}init: Identifier {...}
- type: "Identifier"
- start: 119
- end: 127
loc: {...}
start: {...}
- line: 7
- column: 10
}end: {...}
- line: 7
- column: 18
}
}- name: "Infinity"
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 130
- end: 149
loc: {...}
start: {...}
- line: 8
- column: 1
}end: {...}
- line: 8
- column: 20
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 134
- end: 148
loc: {...}
start: {...}
- line: 8
- column: 5
}end: {...}
- line: 8
- column: 19
}
}id: Identifier {...}
- type: "Identifier"
- start: 134
- end: 136
loc: {...}
start: {...}
- line: 8
- column: 5
}end: {...}
- line: 8
- column: 7
}
}- name: "y2"
}init: UnaryExpression {...}
- type: "UnaryExpression"
- start: 139
- end: 148
loc: {...}
start: {...}
- line: 8
- column: 10
}end: {...}
- line: 8
- column: 19
}
}- operator: "-"
- prefix: true
argument: Identifier {...}
- type: "Identifier"
- start: 140
- end: 148
loc: {...}
start: {...}
- line: 8
- column: 11
}end: {...}
- line: 8
- column: 19
}
}- name: "Infinity"
}
}
}
]- kind: "let"
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 152
- end: 322
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 17
- column: 5
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 152
- end: 321
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 17
- column: 4
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 152
- end: 226
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 12
- column: 10
}
}object: CallExpression {...}
- type: "CallExpression"
- start: 152
- end: 215
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 11
- column: 56
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 152
- end: 166
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 11
- column: 7
}
}object: Identifier {...}
- type: "Identifier"
- start: 152
- end: 158
loc: {...}
start: {...}
- line: 10
- column: 1
}end: {...}
- line: 10
- column: 7
}
}- name: "series"
}property: Identifier {...}
- type: "Identifier"
- start: 162
- end: 166
loc: {...}
start: {...}
- line: 11
- column: 3
}end: {...}
- line: 11
- column: 7
}
}- name: "sort"
}- computed: false
- optional: false
}arguments: [...] (1)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 167
- end: 214
loc: {...}
start: {...}
- line: 11
- column: 8
}end: {...}
- line: 11
- column: 55
}
}- id: null
- expression: true
- generator: false
- async: false
params: [...] (2)
Identifier {...}
- type: "Identifier"
- start: 168
- end: 169
loc: {...}
start: {...}
- line: 11
- column: 9
}end: {...}
- line: 11
- column: 10
}
}- name: "a"
} Identifier {...}
- type: "Identifier"
- start: 171
- end: 172
loc: {...}
start: {...}
- line: 11
- column: 12
}end: {...}
- line: 11
- column: 13
}
}- name: "b"
}
]body: BinaryExpression {...}
- type: "BinaryExpression"
- start: 177
- end: 214
loc: {...}
start: {...}
- line: 11
- column: 18
}end: {...}
- line: 11
- column: 55
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 177
- end: 194
loc: {...}
start: {...}
- line: 11
- column: 18
}end: {...}
- line: 11
- column: 35
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 177
- end: 192
loc: {...}
start: {...}
- line: 11
- column: 18
}end: {...}
- line: 11
- column: 33
}
}object: Identifier {...}
- type: "Identifier"
- start: 177
- end: 178
loc: {...}
start: {...}
- line: 11
- column: 18
}end: {...}
- line: 11
- column: 19
}
}- name: "b"
}property: BinaryExpression {...}
- type: "BinaryExpression"
- start: 179
- end: 191
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 32
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 179
- end: 187
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 28
}
}object: Identifier {...}
- type: "Identifier"
- start: 179
- end: 180
loc: {...}
start: {...}
- line: 11
- column: 20
}end: {...}
- line: 11
- column: 21
}
}- name: "b"
}property: Identifier {...}
- type: "Identifier"
- start: 181
- end: 187
loc: {...}
start: {...}
- line: 11
- column: 22
}end: {...}
- line: 11
- column: 28
}
}- name: "length"
}- computed: false
- optional: false
}- operator: "-"
right: Literal {...}
- type: "Literal"
- start: 190
- end: 191
loc: {...}
start: {...}
- line: 11
- column: 31
}end: {...}
- line: 11
- column: 32
}
}- value: 1
- raw: "1"
}
}- computed: true
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 193
- end: 194
loc: {...}
start: {...}
- line: 11
- column: 34
}end: {...}
- line: 11
- column: 35
}
}- name: "y"
}- computed: false
- optional: false
}- operator: "-"
right: MemberExpression {...}
- type: "MemberExpression"
- start: 197
- end: 214
loc: {...}
start: {...}
- line: 11
- column: 38
}end: {...}
- line: 11
- column: 55
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 197
- end: 212
loc: {...}
start: {...}
- line: 11
- column: 38
}end: {...}
- line: 11
- column: 53
}
}object: Identifier {...}
- type: "Identifier"
- start: 197
- end: 198
loc: {...}
start: {...}
- line: 11
- column: 38
}end: {...}
- line: 11
- column: 39
}
}- name: "a"
}property: BinaryExpression {...}
- type: "BinaryExpression"
- start: 199
- end: 211
loc: {...}
start: {...}
- line: 11
- column: 40
}end: {...}
- line: 11
- column: 52
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 199
- end: 207
loc: {...}
start: {...}
- line: 11
- column: 40
}end: {...}
- line: 11
- column: 48
}
}object: Identifier {...}
- type: "Identifier"
- start: 199
- end: 200
loc: {...}
start: {...}
- line: 11
- column: 40
}end: {...}
- line: 11
- column: 41
}
}- name: "a"
}property: Identifier {...}
- type: "Identifier"
- start: 201
- end: 207
loc: {...}
start: {...}
- line: 11
- column: 42
}end: {...}
- line: 11
- column: 48
}
}- name: "length"
}- computed: false
- optional: false
}- operator: "-"
right: Literal {...}
- type: "Literal"
- start: 210
- end: 211
loc: {...}
start: {...}
- line: 11
- column: 51
}end: {...}
- line: 11
- column: 52
}
}- value: 1
- raw: "1"
}
}- computed: true
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 213
- end: 214
loc: {...}
start: {...}
- line: 11
- column: 54
}end: {...}
- line: 11
- column: 55
}
}- name: "y"
}- computed: false
- optional: false
}
}
}
]- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 219
- end: 226
loc: {...}
start: {...}
- line: 12
- column: 3
}end: {...}
- line: 12
- column: 10
}
}- name: "forEach"
}- computed: false
- optional: false
}arguments: [...] (1)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 227
- end: 320
loc: {...}
start: {...}
- line: 12
- column: 11
}end: {...}
- line: 17
- column: 3
}
}- id: null
- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 227
- end: 228
loc: {...}
start: {...}
- line: 12
- column: 11
}end: {...}
- line: 12
- column: 12
}
}- name: "s"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 232
- end: 320
loc: {...}
start: {...}
- line: 12
- column: 16
}end: {...}
- line: 17
- column: 3
}
}body: [...] (1)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 237
- end: 316
loc: {...}
start: {...}
- line: 13
- column: 3
}end: {...}
- line: 16
- column: 6
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 237
- end: 315
loc: {...}
start: {...}
- line: 13
- column: 3
}end: {...}
- line: 16
- column: 5
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 237
- end: 246
loc: {...}
start: {...}
- line: 13
- column: 3
}end: {...}
- line: 13
- column: 12
}
}object: Identifier {...}
- type: "Identifier"
- start: 237
- end: 238
loc: {...}
start: {...}
- line: 13
- column: 3
}end: {...}
- line: 13
- column: 4
}
}- name: "s"
}property: Identifier {...}
- type: "Identifier"
- start: 239
- end: 246
loc: {...}
start: {...}
- line: 13
- column: 5
}end: {...}
- line: 13
- column: 12
}
}- name: "forEach"
}- computed: false
- optional: false
}arguments: [...] (1)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 247
- end: 314
loc: {...}
start: {...}
- line: 13
- column: 13
}end: {...}
- line: 16
- column: 4
}
}- id: null
- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 247
- end: 248
loc: {...}
start: {...}
- line: 13
- column: 13
}end: {...}
- line: 13
- column: 14
}
}- name: "d"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 252
- end: 314
loc: {...}
start: {...}
- line: 13
- column: 18
}end: {...}
- line: 16
- column: 4
}
}body: [...] (2)
IfStatement {...}
- type: "IfStatement"
- start: 258
- end: 281
loc: {...}
start: {...}
- line: 14
- column: 4
}end: {...}
- line: 14
- column: 27
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 262
- end: 270
loc: {...}
start: {...}
- line: 14
- column: 8
}end: {...}
- line: 14
- column: 16
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 262
- end: 265
loc: {...}
start: {...}
- line: 14
- column: 8
}end: {...}
- line: 14
- column: 11
}
}object: Identifier {...}
- type: "Identifier"
- start: 262
- end: 263
loc: {...}
start: {...}
- line: 14
- column: 8
}end: {...}
- line: 14
- column: 9
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 264
- end: 265
loc: {...}
start: {...}
- line: 14
- column: 10
}end: {...}
- line: 14
- column: 11
}
}- name: "y"
}- computed: false
- optional: false
}- operator: "<"
right: Identifier {...}
- type: "Identifier"
- start: 268
- end: 270
loc: {...}
start: {...}
- line: 14
- column: 14
}end: {...}
- line: 14
- column: 16
}
}- name: "y1"
}
}consequent: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 272
- end: 281
loc: {...}
start: {...}
- line: 14
- column: 18
}end: {...}
- line: 14
- column: 27
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 272
- end: 280
loc: {...}
start: {...}
- line: 14
- column: 18
}end: {...}
- line: 14
- column: 26
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 272
- end: 274
loc: {...}
start: {...}
- line: 14
- column: 18
}end: {...}
- line: 14
- column: 20
}
}- name: "y1"
}right: MemberExpression {...}
- type: "MemberExpression"
- start: 277
- end: 280
loc: {...}
start: {...}
- line: 14
- column: 23
}end: {...}
- line: 14
- column: 26
}
}object: Identifier {...}
- type: "Identifier"
- start: 277
- end: 278
loc: {...}
start: {...}
- line: 14
- column: 23
}end: {...}
- line: 14
- column: 24
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 279
- end: 280
loc: {...}
start: {...}
- line: 14
- column: 25
}end: {...}
- line: 14
- column: 26
}
}- name: "y"
}- computed: false
- optional: false
}
}
}- alternate: null
} IfStatement {...}
- type: "IfStatement"
- start: 286
- end: 309
loc: {...}
start: {...}
- line: 15
- column: 4
}end: {...}
- line: 15
- column: 27
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 290
- end: 298
loc: {...}
start: {...}
- line: 15
- column: 8
}end: {...}
- line: 15
- column: 16
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 290
- end: 293
loc: {...}
start: {...}
- line: 15
- column: 8
}end: {...}
- line: 15
- column: 11
}
}object: Identifier {...}
- type: "Identifier"
- start: 290
- end: 291
loc: {...}
start: {...}
- line: 15
- column: 8
}end: {...}
- line: 15
- column: 9
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 292
- end: 293
loc: {...}
start: {...}
- line: 15
- column: 10
}end: {...}
- line: 15
- column: 11
}
}- name: "y"
}- computed: false
- optional: false
}- operator: ">"
right: Identifier {...}
- type: "Identifier"
- start: 296
- end: 298
loc: {...}
start: {...}
- line: 15
- column: 14
}end: {...}
- line: 15
- column: 16
}
}- name: "y2"
}
}consequent: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 300
- end: 309
loc: {...}
start: {...}
- line: 15
- column: 18
}end: {...}
- line: 15
- column: 27
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 300
- end: 308
loc: {...}
start: {...}
- line: 15
- column: 18
}end: {...}
- line: 15
- column: 26
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 300
- end: 302
loc: {...}
start: {...}
- line: 15
- column: 18
}end: {...}
- line: 15
- column: 20
}
}- name: "y2"
}right: MemberExpression {...}
- type: "MemberExpression"
- start: 305
- end: 308
loc: {...}
start: {...}
- line: 15
- column: 23
}end: {...}
- line: 15
- column: 26
}
}object: Identifier {...}
- type: "Identifier"
- start: 305
- end: 306
loc: {...}
start: {...}
- line: 15
- column: 23
}end: {...}
- line: 15
- column: 24
}
}- name: "d"
}property: Identifier {...}
- type: "Identifier"
- start: 307
- end: 308
loc: {...}
start: {...}
- line: 15
- column: 25
}end: {...}
- line: 15
- column: 26
}
}- name: "y"
}- computed: false
- optional: false
}
}
}- alternate: null
}
]
}
}
]- optional: false
}
}
]
}
}
]- optional: false
}
}
]- sourceType: "module"
}- attributes: []
}
}
The AST is not public API and may change at any point in time