23 lines
255 B
JavaScript
23 lines
255 B
JavaScript
|
function foo(props) {
|
||
|
let {
|
||
|
x
|
||
|
} = {
|
||
|
x: []
|
||
|
};
|
||
|
props.bar |> x.push(%);
|
||
|
if (props.cond) {
|
||
|
({
|
||
|
x
|
||
|
} = {
|
||
|
x: {}
|
||
|
});
|
||
|
({
|
||
|
x
|
||
|
} = {
|
||
|
x: []
|
||
|
});
|
||
|
props.foo |> x.push(%);
|
||
|
}
|
||
|
x |> mut(%);
|
||
|
return x;
|
||
|
}
|