You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/if-block-complex/expected.js

67 lines
1.2 KiB

5 years ago
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
attr,
detach,
element,
empty,
init,
insert,
noop,
safe_not_equal
} from "svelte/internal";
function create_if_block(ctx) {
let div;
return {
c() {
div = element("div");
attr(div, "class", "divider");
},
m(target, anchor) {
insert(target, div, anchor);
},
d(detaching) {
if (detaching) detach(div);
}
};
}
function create_fragment(ctx) {
let show_if = /*item*/ ctx[0].divider && /*item*/ ctx[0].divider.includes(1);
let if_block_anchor;
let if_block = show_if && create_if_block(ctx);
return {
c() {
if (if_block) if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block) if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (if_block) if_block.d(detaching);
if (detaching) detach(if_block_anchor);
}
};
}
function instance($$self) {
let item = { divider: [1] };
return [item];
}
class Component extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, {});
}
}
5 years ago
export default Component;