@virtualstate/examples
Version:
57 lines • 2.06 kB
JavaScript
import { equal, h, createFragment } from "@virtualstate/fringe";
function Structure() {
return (h("thing", null,
h("inner", null)));
}
async function Equal() {
const instance = h(Structure, null);
return (h("p", null,
"Is Equal ",
`${await equal(instance, instance)}`,
"Is Equal ",
`${await equal(instance, h(Structure, null))}`,
"Is Equal ",
`${await equal(h(Structure, null), h(Structure, null))}`,
"Is Equal ",
`${await equal(h(Structure, null), (h(createFragment, null, h(async function* Thing() {
yield h("z", null);
yield h("thing", null);
yield h("thing", null,
h("zee", null));
yield h("thing", null,
h("inner", null));
}))))}`,
"Is Equal ",
`${await equal(h(Structure, null), (h(createFragment, null, h(async function* Thing() {
yield h("thing", null,
h("inner", { value: "1" }));
}))))}`,
"Is Equal ",
`${await equal(h("thing", null,
h("inner", { value: "1" })), (h(createFragment, null, h(async function* Thing() {
async function* Inner() {
yield h("inner", null);
yield h("inner", { value: "1" });
}
yield h("thing", null,
h(Inner, null));
}))))}`,
"Is Equal ",
`${await equal(h(async function* Thing() {
async function* Inner() {
yield h("inner", { value: "1" });
}
yield h("thing", null,
h(Inner, null));
}), (h(createFragment, null, h(async function* Thing() {
async function* Inner() {
yield h("inner", null);
yield h("inner", { value: "1" });
}
yield h("thing", null,
h(Inner, null));
}))))}`));
}
export const _EEQ01_Equal = h(Equal, null);
export const _EEQ01_URL = import.meta.url;
//# sourceMappingURL=index.js.map